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=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 919F7C2D0DC for ; Thu, 2 Jan 2020 13:48:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D56321734 for ; Thu, 2 Jan 2020 13:48:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D56321734 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D86796E0EF; Thu, 2 Jan 2020 13:48:36 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF8F06E0EF for ; Thu, 2 Jan 2020 13:48:35 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 05:48:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,387,1571727600"; d="scan'208";a="252258704" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 02 Jan 2020 05:48:34 -0800 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jan 2020 13:48:33 +0000 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.130]) by irsmsx155.ger.corp.intel.com ([169.254.14.75]) with mapi id 14.03.0439.000; Thu, 2 Jan 2020 13:48:33 +0000 From: "Kahola, Mika" To: "intel-gfx@lists.freedesktop.org" , "Deak, Imre" Thread-Topic: [PATCH 4/7] drm/i915: Make sure plane dims are correct for UV CCS planes Thread-Index: AQHVwDNv7z3FYpc1I0WmG6WkTxRn1afXZjyA Date: Thu, 2 Jan 2020 13:48:32 +0000 Message-ID: <5f9cdacb34bab6ce32653732c045b4ade7228231.camel@intel.com> References: <20191231233756.18753-1-imre.deak@intel.com> <20191231233756.18753-5-imre.deak@intel.com> In-Reply-To: <20191231233756.18753-5-imre.deak@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.237.72.159] Content-ID: MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH 4/7] drm/i915: Make sure plane dims are correct for UV CCS planes X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Pandiyan, Dhinakaran" Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 2020-01-01 at 01:37 +0200, Imre Deak wrote: > As intel_fb_plane_get_subsampling() returns the subsampling factor > wrt. > its main plane, for a CCS plane we need to apply both the main and > the > CCS plane's subsampling factor on the FB's dimensions to get the CCS > plane's dimensions. > = > Cc: Dhinakaran Pandiyan > Cc: Mika Kahola > Cc: Radhakrishna Sripada > Cc: Ville Syrj=E4l=E4 > Cc: Matt Roper > Signed-off-by: Imre Deak Reviewed-by: Mika Kahola > --- > drivers/gpu/drm/i915/display/intel_display.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > = > diff --git a/drivers/gpu/drm/i915/display/intel_display.c > b/drivers/gpu/drm/i915/display/intel_display.c > index 2c2450d3469b..d5128e900660 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -2913,11 +2913,15 @@ intel_fb_check_ccs_xy(struct drm_framebuffer > *fb, int ccs_plane, int x, int y) > static void > intel_fb_plane_dims(int *w, int *h, struct drm_framebuffer *fb, int > color_plane) > { > + int main_plane =3D is_ccs_plane(fb, color_plane) ? > + ccs_to_main_plane(fb, color_plane) : 0; > + int main_hsub, main_vsub; > int hsub, vsub; > = > + intel_fb_plane_get_subsampling(&main_hsub, &main_vsub, fb, > main_plane); > intel_fb_plane_get_subsampling(&hsub, &vsub, fb, color_plane); > - *w =3D fb->width / hsub; > - *h =3D fb->height / vsub; > + *w =3D fb->width / main_hsub / hsub; > + *h =3D fb->height / main_vsub / vsub; > } > = > /* _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx