[Intel-gfx] [PATCH] drm/i915: Avoid null dereference if mst_port is unset.
Stefan Assmann
sassmann at redhat.com
Thu Aug 10 17:45:55 UTC 2017
On 2017-08-10 07:50, Rodrigo Vivi wrote:
> I'm not sure if this is really the case and I don't believe
> this is the real fix for the bug mentioned here, but since
> I don't see a reliable path when mst_port is set and when
> mode_valid is requested I believe it is worth to have this
> protection here.
Hi Rodrigo,
I've applied the patch but problem seems to be somewhere else. After
switching display input the system is no longer reachable via ssh.
I ran dmesg -w over ssh and captured the output as far as possible.
Have a look:
https://paste.fedoraproject.org/paste/mgzW~jAzpaS4A3rmfkTZKw
Thanks!
Stefan
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102022
> Cc: Elizabeth <elizabethx.de.la.torre.mena at intel.com>
> Cc: Stefan Assmann <sassmann at redhat.com>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp_mst.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index 58568559711a..93fc8ab9bb31 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -370,6 +370,9 @@ intel_dp_mst_mode_valid(struct drm_connector *connector,
> int bpp = 24; /* MST uses fixed bpp */
> int max_rate, mode_rate, max_lanes, max_link_clock;
>
> + if (!intel_dp)
> + return MODE_ERROR;
> +
> max_link_clock = intel_dp_max_link_rate(intel_dp);
> max_lanes = intel_dp_max_lane_count(intel_dp);
>
> --
> 2.13.2
>
More information about the Intel-gfx
mailing list