]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915: Do not create a new max_bpc prop for MST connectors
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 20 Aug 2019 16:16:57 +0000 (19:16 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 21 Aug 2019 16:40:55 +0000 (19:40 +0300)
commit1b9bd09630d4db4827cc04d358a41a16a6bc2cb0
tree5c5baa1f2765af05cc2bc316bd8266cd54f7782b
parenta20ab592d1a87218229109d109b8e2feae6f598d
drm/i915: Do not create a new max_bpc prop for MST connectors

We're not allowed to create new properties after device registration
so for MST connectors we need to either create the max_bpc property
earlier, or we reuse one we already have. Let's do the latter apporach
since the corresponding SST connector already has the prop and its
min/max are correct also for the MST connector.

The problem was highlighted by commit 4f5368b5541a ("drm/kms:
Catch mode_object lifetime errors") which results in the following
spew:
[ 1330.878941] WARNING: CPU: 2 PID: 1554 at drivers/gpu/drm/drm_mode_object.c:45 __drm_mode_object_add+0xa0/0xb0 [drm]
...
[ 1330.879008] Call Trace:
[ 1330.879023]  drm_property_create+0xba/0x180 [drm]
[ 1330.879036]  drm_property_create_range+0x15/0x30 [drm]
[ 1330.879048]  drm_connector_attach_max_bpc_property+0x62/0x80 [drm]
[ 1330.879086]  intel_dp_add_mst_connector+0x11f/0x140 [i915]
[ 1330.879094]  drm_dp_add_port.isra.20+0x20b/0x440 [drm_kms_helper]
...

Cc: stable@vger.kernel.org
Cc: Lyude Paul <lyude@redhat.com>
Cc: sunpeng.li@amd.com
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <sean@poorly.run>
Fixes: 5ca0ef8a56b8 ("drm/i915: Add max_bpc property for DP MST")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190820161657.9658-1-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/i915/display/intel_dp_mst.c