[RFC 2/3] drm/mediatek: add support for Mediatek SoC MT2701
Emil Velikov
emil.l.velikov at gmail.com
Wed May 18 13:26:04 PDT 2016
On 18 May 2016 at 09:33, YT Shen <yt.shen at mediatek.com> wrote:
>> > @@ -108,6 +108,10 @@ int mtk_drm_gem_dumb_create(struct drm_file *file_priv, struct drm_device *dev,
>> > int ret;
>> >
>> > args->pitch = DIV_ROUND_UP(args->width * args->bpp, 8);
>> > + /*
>> > + * align to 8 bytes since Mali requires it.
>> > + */
>> > + args->pitch = ALIGN(args->pitch, 8);
>> Are you sure we need this, based on the line just above ?
> I think bpp stands for bits per pixel, so width * bpp / 8 simply transfer from bits to bytes, which
> cannot guarantee align to 8.
>
You're absolutely correct. Reading the comment made me loose my mind
and completely misinterpret the division macro.
> I will remove this align part from the patch, this constraint is not from display controller.
Thank you !
Regards
Emil
More information about the Linux-mediatek
mailing list