Skip to content

Commit 0ba557d

Browse files
Manasi Navaregregkh
authored andcommitted
drm/vrr: Set VRR capable prop only if it is attached to connector
[ Upstream commit 6292972 ] 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> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220225013055.9282-1-manasi.d.navare@intel.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9a8e4a5 commit 0ba557d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/gpu/drm/drm_connector.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,9 @@ EXPORT_SYMBOL(drm_connector_attach_max_bpc_property);
21552155
void drm_connector_set_vrr_capable_property(
21562156
struct drm_connector *connector, bool capable)
21572157
{
2158+
if (!connector->vrr_capable_property)
2159+
return;
2160+
21582161
drm_object_property_set_value(&connector->base,
21592162
connector->vrr_capable_property,
21602163
capable);

0 commit comments

Comments
 (0)