[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <45055b17-041c-f726-6c5d-5769c96b92d9@huawei.com>
Date: Tue, 31 Dec 2019 09:25:54 +0800
From: "tiantao (H)" <tiantao6@...wei.com>
To: Daniel Stone <daniel@...ishbar.org>,
Tian Tao <tiantao6@...ilicon.com>
CC: Chen Feng <puck.chen@...ilicon.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, <tzimmermann@...e.de>,
Gerd Hoffmann <kraxel@...hat.com>,
Alex Deucher <alexander.deucher@....com>, <tglx@...utronix.de>,
dri-devel <dri-devel@...ts.freedesktop.org>,
"Xinliang Liu" <xinliang.liu@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
<linuxarm@...wei.com>
Subject: Re: [PATCH] drm/hisilicon: Added three new resolutions and changed
the alignment to 128 Bytes
Hi Daniel:
Thanks you very much ,I will follow your suggestion to split this to
three patches.
Best
在 2019/12/30 18:23, Daniel Stone 写道:
> Hi Tian,
>
> On Sat, 28 Dec 2019 at 01:14, Tian Tao <tiantao6@...ilicon.com> wrote:
>> @@ -118,11 +119,9 @@ static void hibmc_plane_atomic_update(struct drm_plane *plane,
>> writel(gpu_addr, priv->mmio + HIBMC_CRT_FB_ADDRESS);
>>
>> reg = state->fb->width * (state->fb->format->cpp[0]);
>> - /* now line_pad is 16 */
>> - reg = PADDING(16, reg);
>>
>> line_l = state->fb->width * state->fb->format->cpp[0];
>> - line_l = PADDING(16, line_l);
>> + line_l = PADDING(128, line_l);
>
> The 'line length' here is the 'stride' field of the FB. Stride is set
> by userspace when allocating the buffer, and the kernel must not
> attempt to guess what userspace set.
>
> You should use state->fb->strides[0] directly here, and in your
> atomic_check() function, make sure that the framebuffer stride is
> correctly aligned.
>
> Please split this into a separate change. Your commit has three
> changes in it, which should all be separate commits:
> * enforce 128-byte stride alignment (is this a hardware limit?)
> * get the BO from drm_fb rather than hibmc_fb (can hibmc_fb->obj
> just be removed now?)
> * add new clock/resolution configurations
>
> Cheers,
> Daniel
>
> .
>
Powered by blists - more mailing lists