Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1332182pxp; Thu, 17 Mar 2022 07:29:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjt6faLEBrKdLyD5vo2pBqfo4NJdMwBxI0s9ymRyNi5xznQaxWEIJ9A7ZqWMuDsLHD5hLZ X-Received: by 2002:a17:902:b204:b0:14d:a8c8:af37 with SMTP id t4-20020a170902b20400b0014da8c8af37mr5027128plr.108.1647527376471; Thu, 17 Mar 2022 07:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647527376; cv=none; d=google.com; s=arc-20160816; b=WqEuhiu5wxV46YqhhQoLyjuTzv87EhJDJDlb540jphQHjMYqdQSYnkTl40rmh210zD XdJ3XoI1y2bHNztfAHUfuNNQqBnVbSNJpWajVCrahVYiDXhPsnNcQd8cFmBXA5AcDuv1 F/9qPWBQ2/1LitMUbcqokTD/EIZdB8OviVou2sP5CVRnc7YdBeLX9IYW/66AmWn2aT0M g9CEskohdRq/aFqSxpQz9AOgPhSMFPvrvOi96oUvi4hs5AcocrPdQJeEDctw9ot4S/lX AysR1BMFLzB1r9PN9O2OKzeBeM9O2CZXOzEwcujxwWBsVkvBtYft/dKAQkGF3AWhLEqA zkmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Gpop11OphIIz29Z9Bp6lDLg2qiDx06eFIPwCZT7NvPA=; b=gnf5Nxjs3qaj7JyEbKa9le5domUIhg7tKt/dk+xCM4U8qdqaESiMHFoltJuqufl3bf +srkjslg3ZYrj6jjYcrNBFyCj88j1765tcht240vNYSvbbg2mmcGumousqQ/L/lz+J1p +405Hdixj2zS+VOfSvsdYrxqvKYiBoJu/dTMjJkgmxEy0gGHhCNolA/vaLm5Yii5OGm7 ySr4V33NT7u/1M20n9I4xzzvGhIGhUvtkh5AiyPtruq5zEIX9XtCaL9AVlFIz5SHxrsp sX/nmytB+fAzBzaXvk9kXNP2GVxqFkE7tBd8w2L318C1VOajwj4p6xaEDSaazyeoapOm sdzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LbU6c0Cy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s25-20020a63ff59000000b003816043eeafsi2069086pgk.164.2022.03.17.07.29.21; Thu, 17 Mar 2022 07:29:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LbU6c0Cy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234978AbiCQM6e (ORCPT + 99 others); Thu, 17 Mar 2022 08:58:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235112AbiCQMyn (ORCPT ); Thu, 17 Mar 2022 08:54:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F05B1EC6D; Thu, 17 Mar 2022 05:53:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0903D614FF; Thu, 17 Mar 2022 12:53:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E75EDC340E9; Thu, 17 Mar 2022 12:53:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647521606; bh=pnnLmjgrFj3YqWEw384JKVp/R+b1txHwuHbbSAYmroM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LbU6c0Cytrvfq9O9yyOsjUbGb0m4345e/GN8/XbJM/DSkm91k0rCJM/6Oi0B9rLz/ hhQVpmFdkyIKmpVyFU8uklrKtLA+P8wO41pvZBRMMnf1OmtZ7eznEFx/ITNyrUf5jQ vpHc0NHu/CJzusZH+V+xle41xtYcTLYG9qFvu7GU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jani Nikula , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , dri-devel@lists.freedesktop.org, Manasi Navare , Sasha Levin Subject: [PATCH 5.16 22/28] drm/vrr: Set VRR capable prop only if it is attached to connector Date: Thu, 17 Mar 2022 13:46:13 +0100 Message-Id: <20220317124527.396397346@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317124526.768423926@linuxfoundation.org> References: <20220317124526.768423926@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Manasi Navare [ Upstream commit 62929726ef0ec72cbbe9440c5d125d4278b99894 ] 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ä Link: https://patchwork.freedesktop.org/patch/msgid/20220225013055.9282-1-manasi.d.navare@intel.com Signed-off-by: Sasha Levin --- 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 52e20c68813b..6ae26e7d3dec 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -2275,6 +2275,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.34.1