[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7d50a061-dd73-40e4-af7d-ac8252bcea25@collabora.com>
Date: Wed, 25 Oct 2023 12:43:53 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: CK Hu (胡俊光) <ck.hu@...iatek.com>,
"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"wenst@...omium.org" <wenst@...omium.org>,
"kernel@...labora.com" <kernel@...labora.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"ehristev@...labora.com" <ehristev@...labora.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"nfraprado@...labora.com" <nfraprado@...labora.com>
Subject: Re: [PATCH v11 08/16] drm/mediatek: De-commonize disp_aal/disp_gamma
gamma_set functions
Il 13/10/23 06:07, CK Hu (胡俊光) ha scritto:
> Hi, Angelo:
>
> On Thu, 2023-10-12 at 11:57 +0200, AngeloGioacchino Del Regno wrote:
>> In preparation for adding a 12-bits gamma support for the DISP_GAMMA
>> IP, remove the mtk_gamma_set_common() function and move the relevant
>> bits in mtk_gamma_set() for DISP_GAMMA and mtk_aal_gamma_set() for
>> DISP_AAL: since the latter has no more support for gamma manipulation
>> (being moved to a different IP) in newer revisions, those functions
>> are about to diverge and it makes no sense to keep a common one (with
>> all the complications of passing common data and making exclusions
>> for device driver data) for just a few bits.
>>
>> This commit brings no functional changes.
>
> Reviewed-by: CK Hu <ck.hu@...iatek.com>
>
>>
>> Signed-off-by: AngeloGioacchino Del Regno <
>> angelogioacchino.delregno@...labora.com>
..snip..
>> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
>> b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
>> index 81c04518a5eb..0929f8830d6d 100644
>> --- a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
>> +++ b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c
>> @@ -69,41 +69,28 @@ unsigned int mtk_gamma_get_lut_size(struct device
>> *dev)
>> return 0;
>> }
>>
>> -void mtk_gamma_set_common(struct device *dev, void __iomem *regs,
>> struct drm_crtc_state *state)
>> +void mtk_gamma_set(struct device *dev, struct drm_crtc_state *state)
>> {
..snip..
>>
>> - cfg_val = readl(regs + DISP_GAMMA_CFG);
>> + cfg_val = readl(gamma->regs + DISP_GAMMA_CFG);
>>
>> /* Enable the gamma table */
>> cfg_val |= FIELD_PREP(GAMMA_LUT_EN, 1);
>>
>> - writel(cfg_val, regs + DISP_GAMMA_CFG);
>> -}
>> -
>> -void mtk_gamma_set(struct device *dev, struct drm_crtc_state *state)
>> -{
>> - struct mtk_disp_gamma *gamma = dev_get_drvdata(dev);
>> -
>> - mtk_gamma_set_common(dev, gamma->regs, state);
>> + writel(cfg_val, gamma->regs + DISP_GAMMA_CFG);
Hello CK,
something went wrong while you applied this patch: this writel became a readl,
breaking mtk_disp_gamma entirely. Please check:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/gpu/drm/mediatek/mtk_disp_gamma.c?h=next-20231025&id=a6b39cd248f3321dbf066f95f95a9841f891229e
Thanks,
Angelo
Powered by blists - more mailing lists