Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8538547imu; Tue, 4 Dec 2018 09:54:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/VZJjA5CCM2Q9b/WBEFWbR7QS0KDdH7InFTr+wLeSV1S7/jnZ9gh3IylA1yHKrya2eh3yBf X-Received: by 2002:aa7:8758:: with SMTP id g24mr20559835pfo.250.1543946070142; Tue, 04 Dec 2018 09:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543946070; cv=none; d=google.com; s=arc-20160816; b=A6cht7JAWUzHPsISoKu/J9kYlWSOF/ekRPSMaViwWCx9gWtxsqtKg63369Gz1l6e1r 5rvUHRm7XztCAjSe6AXjVImd043ltRYi9q6doQi1CJ5MMECjq2qEIuiI0wrkOZDAIJcl e+aNVje1pTamSZ0BaHZRTe7Yk9kkdpliAJAeq3tFvuGUd0ukeHsYzQ2OdVD2Bv9t39uh mCBo2wVLXjm7pai77N3j8Gib1gFTfW0h2gGoi6MYYpw7+epCELxXcEXofe9q2+bpRCoK zBt0mFfeVo0/0BxuZvGnrjaxvJ/icZJu25hMld6BHwHqulmIa3FjWsBAAcoqCHzv6HCs 1uJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Epo587wXgYwdRhhbaQeRNPDFM1MWW05Z04ugHlR8jCo=; b=W7xnAJTNNCzw7pOGgCxKY2hG9m0PlF3IiEk6jrDblE8jARuVgb3H4K8KWW3chH2OuT VFYyqj1H097ZaXFcmVzQi9Efm9AHn/lx58XkJ0C1CntMP9YffvkDZ3NH5Bb+27FSzq+T XhxTSeo7Uee/jNtcuG4AxUPZBIbojcxom1/qD8oJ9X+mZqhmgN0cP6kqiZpzsZyw3QtU eeY/WrBHNn2LucgchGOwINiPliKvtvoRxVi35+QuouvOiOUh1U0rVPnMldvcnx4t6opf sGNtL0ntcD75ykSU0ALW78CQNh1HDxcr0uNDaU3AcNIabZtn+LSuxSfCW1TL40xPDr3F fNLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w75si18145187pfd.55.2018.12.04.09.54.14; Tue, 04 Dec 2018 09:54:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727419AbeLDRwY (ORCPT + 99 others); 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! / --------------- ¯\_(ツ)_/¯