[PATCH 1/8] drm/mediatek: Use regmap for register access
Matthias Brugger
matthias.bgg at gmail.com
Fri Apr 20 02:41:22 PDT 2018
Hi Philipp,
On 11/23/2017 09:54 AM, Philipp Zabel wrote:
> Hi Matthias,
>
> On Tue, 2017-11-14 at 22:41 +0100, Matthias Brugger wrote:
>> The mmsys memory space is shared between the drm and the
>> clk driver. Use regmap to access it.
>>
>> Signed-off-by: Matthias Brugger <mbrugger at suse.com>
>> ---
>> drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 4 ++--
>> drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 30 +++++++++++++++++-------------
>> drivers/gpu/drm/mediatek/mtk_drm_ddp.h | 4 ++--
>> drivers/gpu/drm/mediatek/mtk_drm_drv.c | 13 ++++---------
>> drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +-
>> 5 files changed, 26 insertions(+), 27 deletions(-)
> [...]
[...]
>> }
>>
>> value = mtk_ddp_sel_in(cur, next, &addr);
>> if (value) {
>> - reg = readl_relaxed(config_regs + addr) & ~value;
>> - writel_relaxed(reg, config_regs + addr);
>> + regmap_read(config_regs, addr, ®);
>> + reg &= ~value;
>> + regmap_write(config_regs, addr, reg);
>
> regmap_update_bits(config_regs, addr, value, 0);
>
> Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>
>
Thanks for having a look on that.
I'll update the next version with regmap_update_bits and leave your Reviewed-by,
hope that's ok.
Regards,
Matthias
More information about the Linux-mediatek
mailing list