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,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 28532C00A89 for ; Mon, 2 Nov 2020 16:06: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 BD304222EC for ; Mon, 2 Nov 2020 16:06:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD304222EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 366BB6E542; Mon, 2 Nov 2020 16:06:36 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id C41466E542 for ; Mon, 2 Nov 2020 16:06:34 +0000 (UTC) IronPort-SDR: FLYMwQ7GNiOmY7FyIivGunHoOCW0QyBcm+is3noblr7b6TAc2Kj8N+vyNnVarQLbNGcyB+Di5J zWpy2z4UzABA== X-IronPort-AV: E=McAfee;i="6000,8403,9793"; a="166315624" X-IronPort-AV: E=Sophos;i="5.77,445,1596524400"; d="scan'208";a="166315624" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2020 08:06:34 -0800 IronPort-SDR: zp6zzhDtL7ITx6cq0aXrazq0t02nxCPE6jryXRhbnZTJ2gK+nhsZIBfyDgHuSjPGbwOBk+97i0 EMMWqyFTobSA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,445,1596524400"; d="scan'208";a="305734571" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga007.fm.intel.com with SMTP; 02 Nov 2020 08:06:31 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 02 Nov 2020 18:06:30 +0200 Date: Mon, 2 Nov 2020 18:06:30 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Maxime Ripard Subject: Re: [PATCH 1/3] drm/nouveau/kms/nv50-: Use state helper instead of crtc pointer Message-ID: <20201102160630.GP6112@intel.com> References: <20201102133834.1176740-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201102133834.1176740-1-maxime@cerno.tech> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Thomas Zimmermann Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Nov 02, 2020 at 02:38:32PM +0100, Maxime Ripard wrote: > dispnv50 references the crtc->state pointer in order to get the current > CRTC state in its atomic_check hook, which would be the old CRTC state in > the global atomic state. > = > Use the drm_atomic_get_old_crtc_state helper to get that state to make it > more obvious. > = > Suggested-by: Ville Syrj=E4l=E4 > Signed-off-by: Maxime Ripard Looks correct Reviewed-by: Ville Syrj=E4l=E4 > --- > drivers/gpu/drm/nouveau/dispnv50/head.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/no= uveau/dispnv50/head.c > index 0542ca22b33a..537c1ef2e464 100644 > --- a/drivers/gpu/drm/nouveau/dispnv50/head.c > +++ b/drivers/gpu/drm/nouveau/dispnv50/head.c > @@ -313,11 +313,13 @@ nv50_head_atomic_check_mode(struct nv50_head *head,= struct nv50_head_atom *asyh) > static int > nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *s= tate) > { > + struct drm_crtc_state *old_crtc_state =3D drm_atomic_get_old_crtc_state= (state, > + crtc); > struct drm_crtc_state *crtc_state =3D drm_atomic_get_new_crtc_state(sta= te, > crtc); > struct nouveau_drm *drm =3D nouveau_drm(crtc->dev); > struct nv50_head *head =3D nv50_head(crtc); > - struct nv50_head_atom *armh =3D nv50_head_atom(crtc->state); > + struct nv50_head_atom *armh =3D nv50_head_atom(old_crtc_state); > struct nv50_head_atom *asyh =3D nv50_head_atom(crtc_state); > struct nouveau_conn_atom *asyc =3D NULL; > struct drm_connector_state *conns; > -- = > 2.28.0 -- = Ville Syrj=E4l=E4 Intel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel