All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/msm/dsi: use RMW cycles in dsi_update_dsc_timing
@ 2022-04-30 17:55 ` Dmitry Baryshkov
  0 siblings, 0 replies; 40+ messages in thread
From: Dmitry Baryshkov @ 2022-04-30 17:55 UTC (permalink / raw)
  To: Bjorn Andersson, Rob Clark, Sean Paul, Abhinav Kumar
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	dri-devel, freedreno, kernel test robot

The downstream uses read-modify-write for updating command mode
compression registers. Let's follow this approach. This also fixes the
following warning:

drivers/gpu/drm/msm/dsi/dsi_host.c:918:23: warning: variable 'reg_ctrl' set but not used [-Wunused-but-set-variable]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---

Changes since v1:
 - Fix c&p error and apply mask clear to reg_ctrl2 instead of reg_ctrl
   (Abhinav)

---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index c983698d1384..a95d5df52653 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -961,10 +961,13 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
 		reg_ctrl = dsi_read(msm_host, REG_DSI_COMMAND_COMPRESSION_MODE_CTRL);
 		reg_ctrl2 = dsi_read(msm_host, REG_DSI_COMMAND_COMPRESSION_MODE_CTRL2);
 
+		reg_ctrl &= ~0xffff;
 		reg_ctrl |= reg;
+
+		reg_ctrl2 &= ~DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH__MASK;
 		reg_ctrl2 |= DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH(bytes_in_slice);
 
-		dsi_write(msm_host, REG_DSI_COMMAND_COMPRESSION_MODE_CTRL, reg);
+		dsi_write(msm_host, REG_DSI_COMMAND_COMPRESSION_MODE_CTRL, reg_ctrl);
 		dsi_write(msm_host, REG_DSI_COMMAND_COMPRESSION_MODE_CTRL2, reg_ctrl2);
 	} else {
 		dsi_write(msm_host, REG_DSI_VIDEO_COMPRESSION_MODE_CTRL, reg);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2022-05-04 13:41 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 17:55 [PATCH v2] drm/msm/dsi: use RMW cycles in dsi_update_dsc_timing Dmitry Baryshkov
2022-04-30 17:55 ` Dmitry Baryshkov
2022-04-30 18:42 ` Abhinav Kumar
2022-04-30 18:42   ` Abhinav Kumar
2022-04-30 18:58 ` Marijn Suijten
2022-04-30 18:58   ` Marijn Suijten
2022-04-30 19:25   ` [Freedreno] " Abhinav Kumar
2022-04-30 19:25     ` Abhinav Kumar
2022-05-01 20:06     ` Marijn Suijten
2022-05-01 20:06       ` Marijn Suijten
2022-05-01 23:56       ` Abhinav Kumar
2022-05-01 23:56         ` Abhinav Kumar
2022-05-02  8:02         ` Dmitry Baryshkov
2022-05-02  8:02           ` Dmitry Baryshkov
2022-05-02  8:34         ` Marijn Suijten
2022-05-02  8:34           ` Marijn Suijten
2022-05-02 10:02           ` Dmitry Baryshkov
2022-05-02 10:02             ` Dmitry Baryshkov
2022-05-02 21:56             ` Marijn Suijten
2022-05-02 21:56               ` Marijn Suijten
2022-04-30 19:28   ` Dmitry Baryshkov
2022-04-30 19:28     ` Dmitry Baryshkov
2022-05-01 20:41     ` Marijn Suijten
2022-05-01 20:41       ` Marijn Suijten
2022-05-01 22:44       ` Dmitry Baryshkov
2022-05-01 22:44         ` Dmitry Baryshkov
2022-05-02  8:43         ` Marijn Suijten
2022-05-02  8:43           ` Marijn Suijten
2022-05-02  9:41           ` Dmitry Baryshkov
2022-05-02  9:41             ` Dmitry Baryshkov
2022-05-02 21:53             ` Marijn Suijten
2022-05-02 21:53               ` Marijn Suijten
2022-05-04 13:41           ` [Freedreno] " Vinod Koul
2022-05-04 13:41             ` Vinod Koul
2022-05-04 13:38       ` Vinod Koul
2022-05-04 13:38         ` Vinod Koul
2022-05-04 13:35     ` Vinod Koul
2022-05-04 13:35       ` Vinod Koul
2022-05-04 13:31 ` [Freedreno] " Vinod Koul
2022-05-04 13:31   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.