All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v6 1/2] drm/vrr: Set VRR capable prop only if it is attached to connector
@ 2022-02-25  1:30 ` Manasi Navare
  0 siblings, 0 replies; 13+ messages in thread
From: Manasi Navare @ 2022-02-25  1:30 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, dri-devel

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 <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-03-01 23:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-25  1:30 [Intel-gfx] [PATCH v6 1/2] drm/vrr: Set VRR capable prop only if it is attached to connector Manasi Navare
2022-02-25  1:30 ` Manasi Navare
2022-02-25  1:30 ` [Intel-gfx] [PATCH v6 2/2] drm/i915/display/vrr: Reset VRR capable property on a long hpd Manasi Navare
2022-02-25  9:13   ` Ville Syrjälä
2022-02-26  1:11     ` Navare, Manasi
2022-03-01 19:30       ` Navare, Manasi
2022-03-01 19:34         ` Ville Syrjälä
2022-03-01 23:27           ` Navare, Manasi
2022-02-25  4:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v6,1/2] drm/vrr: Set VRR capable prop only if it is attached to connector Patchwork
2022-02-25  5:18 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-25  9:11 ` [Intel-gfx] [PATCH v6 1/2] " Ville Syrjälä
2022-02-25  9:11   ` Ville Syrjälä
2022-02-25 21:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [v6,1/2] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.