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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 88CE4C433F5 for ; Fri, 25 Feb 2022 09:11:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD78310E76C; Fri, 25 Feb 2022 09:11:58 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 532BD10E76C; Fri, 25 Feb 2022 09:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645780318; x=1677316318; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=cjA3HLMn0MXdDb/gXukOEsMXh5dRqhgoKbD/zCus6Ns=; b=J6gHbT8Lj3PkUc2TzwFJK85SIgFHwg+TNs0irItLHjbLW9A2UslGgZJ3 sMiG8w0aOC6S2cG3PwSYGcmNlIqLd/kWV003qGYJKpSs7InJp5BNjJAnY gss3gXI2QbEvzCBKGI9f7+jqh1oGpzWLSeUG6J75wXMwAqtEgIrs9Kntc Rg0rSNRrETCgQVQBkRROmlbyrmXv1afAwzFgBSF1aMFpumXnSlXRW0FJG bSIhex0TAQZkEOSV1r3Ici0mWyQpSzlPDQv7GxunbQURG822ILBkJBdJI 6EJ6EHEXZ/tOykKfN6+WLPAT9t2xIRuEKv7I5l4UQyNu4NRxs6z+mkwRA g==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="235967926" X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="235967926" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Feb 2022 01:11:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,136,1643702400"; d="scan'208";a="533507468" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.151]) by orsmga007.jf.intel.com with SMTP; 25 Feb 2022 01:11:54 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 25 Feb 2022 11:11:53 +0200 Date: Fri, 25 Feb 2022 11:11:53 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Manasi Navare Message-ID: References: <20220225013055.9282-1-manasi.d.navare@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220225013055.9282-1-manasi.d.navare@intel.com> X-Patchwork-Hint: comment Subject: Re: [Intel-gfx] [PATCH v6 1/2] drm/vrr: Set VRR capable prop only if it is attached to connector 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: Jani Nikula , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, Feb 24, 2022 at 05:30:54PM -0800, Manasi Navare wrote: > VRR capable property is not attached by default to the connector > It is attached only if VRR is supported. > So if the driver tries to call drm core set prop function without > it being attached that causes NULL dereference. > > Cc: Jani Nikula > Cc: Ville Syrjälä > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä > --- > drivers/gpu/drm/drm_connector.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c > index a50c82bc2b2f..76a8c707c34b 100644 > --- a/drivers/gpu/drm/drm_connector.c > +++ b/drivers/gpu/drm/drm_connector.c > @@ -2330,6 +2330,9 @@ EXPORT_SYMBOL(drm_connector_atomic_hdr_metadata_equal); > void drm_connector_set_vrr_capable_property( > struct drm_connector *connector, bool capable) > { > + if (!connector->vrr_capable_property) > + return; > + > drm_object_property_set_value(&connector->base, > connector->vrr_capable_property, > capable); > -- > 2.19.1 -- Ville Syrjälä Intel