From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6710DC04EB8 for ; Tue, 4 Dec 2018 17:52:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 399322082F for ; Tue, 4 Dec 2018 17:52:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 399322082F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727427AbeLDRwY (ORCPT ); Tue, 4 Dec 2018 12:52:24 -0500 Received: from foss.arm.com ([217.140.101.70]:38196 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726056AbeLDRwY (ORCPT ); Tue, 4 Dec 2018 12:52:24 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B9982A78; Tue, 4 Dec 2018 09:52:23 -0800 (PST) Received: from e110455-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 89CE23F59C; Tue, 4 Dec 2018 09:52:23 -0800 (PST) Received: by e110455-lin.cambridge.arm.com (Postfix, from userid 1000) id E99636801C3; Tue, 4 Dec 2018 17:52:21 +0000 (GMT) Date: Tue, 4 Dec 2018 17:52:21 +0000 From: Liviu Dudau To: Ayan Halder Cc: Brian Starkey , "malidp@foss.arm.com" , "airlied@linux.ie" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "maxime.ripard@bootlin.com" , "sean@poorly.run" , "maarten.lankhorst@linux.intel.com" , "corbet@lwn.net" , "mchehab+samsung@kernel.org" , "gregkh@linuxfoundation.org" , "davem@davemloft.net" , "akpm@linux-foundation.org" , "nicolas.ferre@microchip.com" , "arnd@arndb.de" , "linux-doc@vger.kernel.org" , nd Subject: Re: [RFC AFBC 11/12] drm/arm/malidp:- Disregard the pitch alignment constraint for AFBC framebuffer. Message-ID: <20181204175221.GS988@e110455-lin.cambridge.arm.com> References: <1543836703-8491-1-git-send-email-ayan.halder@arm.com> <1543836703-8491-12-git-send-email-ayan.halder@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1543836703-8491-12-git-send-email-ayan.halder@arm.com> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 03, 2018 at 11:32:05AM +0000, Ayan Halder wrote: > Considering the fact that some of the AFBC specific pixel formats are expressed > in bits per pixel (ie bpp which is not byte aligned), the pitch (ie width * bpp) > is not guaranteed to be aligned to burst size (ie 8 or 16 bytes). > For example, DRM_FORMAT_VUY101010 is 30 bits per pixel. For a framebuffer of > width 32 pixels, the pitch will be 120 bytes which is not aligned to burst size > (ie 16 bytes) for DP650. > > Signed-off-by: Ayan Kumar halder Acked-by: Liviu Dudau > --- > drivers/gpu/drm/arm/malidp_planes.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c > index d0a00ee..eec0442 100644 > --- a/drivers/gpu/drm/arm/malidp_planes.c > +++ b/drivers/gpu/drm/arm/malidp_planes.c > @@ -529,8 +529,8 @@ static int malidp_de_plane_check(struct drm_plane *plane, > for (i = 0; i < ms->n_planes; i++) { > u8 alignment = malidp_hw_get_pitch_align(mp->hwdev, rotated); > > - if ((fb->pitches[i] * drm_format_info_block_height(fb->format, i)) > - & (alignment - 1)) { > + if (((fb->pitches[i] * drm_format_info_block_height(fb->format, i)) > + & (alignment - 1)) && !(fb->modifier)) { > DRM_DEBUG_KMS("Invalid pitch %u for plane %d\n", > fb->pitches[i], i); > return -EINVAL; > -- > 2.7.4 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯