diff options
author | Bjorn Andersson <quic_bjorande@quicinc.com> | 2024-03-28 17:40:03 +0300 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-04-22 16:22:49 +0300 |
commit | 986075589ad754d75377dfa51551c2dfd55202c9 (patch) | |
tree | c458edb02fc38124c1a64730dc1e6b2f16bd8010 /drivers/gpu/drm/msm/dp/dp_aux.c | |
parent | 670574c970975f750d3202822a2ae28e44819c02 (diff) | |
download | linux-986075589ad754d75377dfa51551c2dfd55202c9.tar.xz |
drm/msm/dp: Use function arguments for aux writes
The dp_aux write operations takes the data to be operated on through a
member of struct dp_catalog, rather than as an argument to the function.
No state is maintained other than across the calling of the functions,
so replace this member with a function argument.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/585346/
Link: https://lore.kernel.org/r/20240328-msm-dp-cleanup-v2-4-a5aed9798d32@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/msm/dp/dp_aux.c')
-rw-r--r-- | drivers/gpu/drm/msm/dp/dp_aux.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/dp/dp_aux.c b/drivers/gpu/drm/msm/dp/dp_aux.c index 78ed728fa8ea..da46a433bf74 100644 --- a/drivers/gpu/drm/msm/dp/dp_aux.c +++ b/drivers/gpu/drm/msm/dp/dp_aux.c @@ -88,8 +88,7 @@ static ssize_t dp_aux_write(struct dp_aux_private *aux, /* index = 0, write */ if (i == 0) reg |= DP_AUX_DATA_INDEX_WRITE; - aux->catalog->aux_data = reg; - dp_catalog_aux_write_data(aux->catalog); + dp_catalog_aux_write_data(aux->catalog, reg); } dp_catalog_aux_clear_trans(aux->catalog, false); @@ -107,8 +106,7 @@ static ssize_t dp_aux_write(struct dp_aux_private *aux, } reg |= DP_AUX_TRANS_CTRL_GO; - aux->catalog->aux_data = reg; - dp_catalog_aux_write_trans(aux->catalog); + dp_catalog_aux_write_trans(aux->catalog, reg); return len; } @@ -146,8 +144,7 @@ static ssize_t dp_aux_cmd_fifo_rx(struct dp_aux_private *aux, data = DP_AUX_DATA_INDEX_WRITE; /* INDEX_WRITE */ data |= DP_AUX_DATA_READ; /* read */ - aux->catalog->aux_data = data; - dp_catalog_aux_write_data(aux->catalog); + dp_catalog_aux_write_data(aux->catalog, data); dp = msg->buffer; |