drm/mediatek: mtk_disp_gamma: Fix breakage due to merge issue
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Wed, 25 Oct 2023 10:49:40 +0000 (12:49 +0200)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 23 Nov 2023 14:49:47 +0000 (14:49 +0000)
While the commit that was sent to the mailing lists was fine, something
happened during merge and the mtk_gamma_set() function got broken as
a writel() was turned into a readl().

Fix that by changing that back to the expected writel().

Fixes: a6b39cd248f3 ("drm/mediatek: De-commonize disp_aal/disp_gamma gamma_set functions")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20231025104940.140605-1-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_disp_gamma.c

index f81dc34c9c3ef47c42f82ce4704f144fff7b9296..c1bc8b00d9380ce8f320cb106ca17f461257036b 100644 (file)
@@ -203,7 +203,7 @@ void mtk_gamma_set(struct device *dev, struct drm_crtc_state *state)
        /* Disable RELAY mode to pass the processed image */
        cfg_val &= ~GAMMA_RELAY_MODE;
 
-       cfg_val = readl(gamma->regs + DISP_GAMMA_CFG);
+       writel(cfg_val, gamma->regs + DISP_GAMMA_CFG);
 }
 
 void mtk_gamma_config(struct device *dev, unsigned int w,