Re: [PATCH] drm/hisilicon: Added three new resolutions and changed the alignment to 128 Bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxx> 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

.


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux