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=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 DF375C2D0E4 for ; Tue, 17 Nov 2020 09:18:26 +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 7BB372463C for ; Tue, 17 Nov 2020 09:18:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BB372463C 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 B3D756E150; Tue, 17 Nov 2020 09:18:24 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id CA8326E150 for ; Tue, 17 Nov 2020 09:18:23 +0000 (UTC) IronPort-SDR: RAzmgwhd0WtfYwOTyOm/jQ/U9ycB4RvwugLstgLwWeRP+QheFpr9KD9L1mfbX0YeS9BJHWiYHR t60KeDRl21vQ== X-IronPort-AV: E=McAfee;i="6000,8403,9807"; a="170991898" X-IronPort-AV: E=Sophos;i="5.77,485,1596524400"; d="scan'208";a="170991898" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 01:18:22 -0800 IronPort-SDR: z7FCosD3Apd7vf2nfq2O+jsIp11qvJEhUKKfsKMLeMBVD8uJcuJRchhO2LCaX4eIsRYsmcNOJi LtQ4VZvCkwhw== X-IronPort-AV: E=Sophos;i="5.77,485,1596524400"; d="scan'208";a="475853060" Received: from unknown (HELO intel.com) ([10.237.72.91]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 01:18:20 -0800 Date: Tue, 17 Nov 2020 11:19:00 +0200 From: "Lisovskiy, Stanislav" To: Ville Syrjala Message-ID: <20201117091900.GA30333@intel.com> References: <20201113220358.24794-1-ville.syrjala@linux.intel.com> <20201113220358.24794-2-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201113220358.24794-2-ville.syrjala@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [Intel-gfx] [PATCH 01/23] drm/i915: Copy the plane hw state directly for Y 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: intel-gfx@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Sat, Nov 14, 2020 at 12:03:36AM +0200, Ville Syrjala wrote: > From: Ville Syrj=E4l=E4 > = > When doing the plane state copy from the UV plane to the Y plane > let's just copy the hw state directly instead of using the original > uapi state. The UV plane has already had its uapi state copied into > its hw state, so this extra detour via the uapi state for the Y plane > is pointless. > = > Signed-off-by: Ville Syrj=E4l=E4 Reviewed-by: Stanislav Lisovskiy > --- > drivers/gpu/drm/i915/display/intel_atomic_plane.c | 12 ++++++++++++ > drivers/gpu/drm/i915/display/intel_atomic_plane.h | 2 ++ > drivers/gpu/drm/i915/display/intel_display.c | 2 +- > 3 files changed, 15 insertions(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/= gpu/drm/i915/display/intel_atomic_plane.c > index 3334ff253600..f47558efb3c2 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c > @@ -265,6 +265,18 @@ void intel_plane_copy_uapi_to_hw_state(struct intel_= plane_state *plane_state, > plane_state->hw.scaling_filter =3D from_plane_state->uapi.scaling_filte= r; > } > = > +void intel_plane_copy_hw_state(struct intel_plane_state *plane_state, > + const struct intel_plane_state *from_plane_state) > +{ > + intel_plane_clear_hw_state(plane_state); > + > + memcpy(&plane_state->hw, &from_plane_state->hw, > + sizeof(plane_state->hw)); > + > + if (plane_state->hw.fb) > + drm_framebuffer_get(plane_state->hw.fb); > +} > + > void intel_plane_set_invisible(struct intel_crtc_state *crtc_state, > struct intel_plane_state *plane_state) > { > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/= gpu/drm/i915/display/intel_atomic_plane.h > index 59dd1fbb02ea..24a3a148aa62 100644 > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h > @@ -25,6 +25,8 @@ unsigned int intel_plane_data_rate(const struct intel_c= rtc_state *crtc_state, > const struct intel_plane_state *plane_state); > void intel_plane_copy_uapi_to_hw_state(struct intel_plane_state *plane_s= tate, > const struct intel_plane_state *from_plane_state); > +void intel_plane_copy_hw_state(struct intel_plane_state *plane_state, > + const struct intel_plane_state *from_plane_state); > void intel_update_plane(struct intel_plane *plane, > const struct intel_crtc_state *crtc_state, > const struct intel_plane_state *plane_state); > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/d= rm/i915/display/intel_display.c > index 03577ee5d9b7..62d96e6946e6 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -12754,7 +12754,7 @@ static int icl_check_nv12_planes(struct intel_crt= c_state *crtc_state) > memcpy(linked_state->color_plane, plane_state->color_plane, > sizeof(linked_state->color_plane)); > = > - intel_plane_copy_uapi_to_hw_state(linked_state, plane_state); > + intel_plane_copy_hw_state(linked_state, plane_state); > linked_state->uapi.src =3D plane_state->uapi.src; > linked_state->uapi.dst =3D plane_state->uapi.dst; > = > -- = > 2.26.2 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx