From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933317AbcERU0K (ORCPT ); Wed, 18 May 2016 16:26:10 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36754 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933297AbcERU0G (ORCPT ); Wed, 18 May 2016 16:26:06 -0400 MIME-Version: 1.0 In-Reply-To: <1463560401.8576.15.camel@mtksdaap41> References: <1463053795-55455-1-git-send-email-yt.shen@mediatek.com> <1463053795-55455-3-git-send-email-yt.shen@mediatek.com> <1463560401.8576.15.camel@mtksdaap41> Date: Wed, 18 May 2016 21:26:04 +0100 Message-ID: Subject: Re: [RFC 2/3] drm/mediatek: add support for Mediatek SoC MT2701 From: Emil Velikov To: YT Shen Cc: Philipp Zabel , ML dri-devel , Mark Rutland , devicetree , Russell King , srv_heupstream@mediatek.com, Pawel Moll , Ian Campbell , "Linux-Kernel@Vger. Kernel. Org" , Mao Huang , Rob Herring , linux-mediatek@lists.infradead.org, Kumar Gala , Matthias Brugger , Sascha Hauer , LAKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18 May 2016 at 09:33, YT Shen 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