提交 379ed2fc 编写于 作者: M Manasi Navare 提交者: Zheng Zengkai

drm/vrr: Set VRR capable prop only if it is attached to connector

stable inclusion
from stable-v5.10.107
commit 0ba557d330946c23559aaea2d51ea649fdeca98a
bugzilla: https://gitee.com/openeuler/kernel/issues/I574A2

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0ba557d330946c23559aaea2d51ea649fdeca98a

--------------------------------

[ Upstream commit 62929726 ]

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: NManasi Navare <manasi.d.navare@intel.com>
Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220225013055.9282-1-manasi.d.navare@intel.comSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 923ffebe
...@@ -2155,6 +2155,9 @@ EXPORT_SYMBOL(drm_connector_attach_max_bpc_property); ...@@ -2155,6 +2155,9 @@ EXPORT_SYMBOL(drm_connector_attach_max_bpc_property);
void drm_connector_set_vrr_capable_property( void drm_connector_set_vrr_capable_property(
struct drm_connector *connector, bool capable) struct drm_connector *connector, bool capable)
{ {
if (!connector->vrr_capable_property)
return;
drm_object_property_set_value(&connector->base, drm_object_property_set_value(&connector->base,
connector->vrr_capable_property, connector->vrr_capable_property,
capable); capable);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册