linux/drivers/gpu/drm/gma500
Thierry Reding 4f25070621 drm/gma500: Sanity-check pipe index
If the DSI output isn't connected, then mdfld_dsi_encoder_get_pipe()
will return -1. The mdfld_dsi_dp_mode_set() function doesn't properly
check for this condition and causes the following compiler warnings:

	  CC      drivers/gpu/drm/gma500/mdfld_dsi_dpi.o
	drivers/gpu/drm/gma500/mdfld_dsi_dpi.c: In function ‘mdfld_dsi_dpi_mode_set’:
	drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:828:35: warning: array subscript is below array bounds [-Warray-bounds]
	  u32 pipeconf = dev_priv->pipeconf[pipe];
	                                   ^
	drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:829:33: warning: array subscript is below array bounds [-Warray-bounds]
	  u32 dspcntr = dev_priv->dspcntr[pipe];
	                                 ^

Fix this by checking for a valid pipe before indexing the pipeconf and
dspcntr arrays.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-2-git-send-email-boris.brezillon@free-electrons.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-12-15 13:35:25 +01:00
..
accel_2d.c drm/gma500: Use new drm_fb_helper functions 2015-08-06 14:12:59 +02:00
backlight.c
blitter.c
blitter.h
cdv_device.c drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
cdv_device.h
cdv_intel_crt.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
cdv_intel_display.c drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
cdv_intel_dp.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
cdv_intel_hdmi.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
cdv_intel_lvds.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
framebuffer.c drm/gma500: Drop dev->struct_mutex from fbdev init/teardown code 2015-12-01 10:05:03 +01:00
framebuffer.h
gem.c drm/gma500: Add driver private mutex for the fault handler 2015-12-01 10:05:11 +01:00
gem.h
gma_device.c
gma_device.h
gma_display.c drm/gma500: Drop dev->struct_mutex from modeset code 2015-12-01 10:04:59 +01:00
gma_display.h
gtt.c drm/gma500: Add driver private mutex for the fault handler 2015-12-01 10:05:11 +01:00
gtt.h drm: Extract <drm/drm_gem.h> 2014-09-24 11:43:41 +10:00
intel_bios.c drm/gma500: Renaming DP training vswing pre emph defines 2014-09-03 11:05:38 +02:00
intel_bios.h
intel_gmbus.c
intel_i2c.c
Kconfig
Makefile drm/gma500: add support for atom e6xx lpc lvds i2c 2014-12-02 13:42:49 +10:00
mdfld_device.c drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
mdfld_dsi_dpi.c drm/gma500: Sanity-check pipe index 2015-12-15 13:35:25 +01:00
mdfld_dsi_dpi.h
mdfld_dsi_output.c drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
mdfld_dsi_output.h
mdfld_dsi_pkg_sender.c drm/gma500: mdfld: Reuse video/mipi_display.h 2014-11-13 10:44:41 +01:00
mdfld_dsi_pkg_sender.h drm/gma500: mdfld: Reuse video/mipi_display.h 2014-11-13 10:44:41 +01:00
mdfld_intel_display.c drm/gma500: constify all struct drm_*_helper funcs pointers 2015-04-07 17:06:41 +02:00
mdfld_output.c
mdfld_output.h
mdfld_tmd_vid.c
mdfld_tpo_vid.c
mid_bios.c
mid_bios.h
mmu.c
mmu.h
oaktrail_crtc.c drm/gma500: constify all struct drm_*_helper funcs pointers 2015-04-07 17:06:41 +02:00
oaktrail_device.c drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
oaktrail_hdmi_i2c.c
oaktrail_hdmi.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
oaktrail_lvds_i2c.c drm/gma500: add support for atom e6xx lpc lvds i2c 2014-12-02 13:42:49 +10:00
oaktrail_lvds.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
oaktrail.h
opregion.c
opregion.h
power.c
power.h
psb_device.c drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
psb_device.h
psb_drv.c drm/gma500: add support for atom e6xx lpc lvds i2c 2014-12-02 13:42:49 +10:00
psb_drv.h drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
psb_intel_display.c drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
psb_intel_drv.h drm/gma500: Move to private save/restore hooks 2015-12-08 16:13:30 +01:00
psb_intel_lvds.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
psb_intel_modes.c
psb_intel_reg.h
psb_intel_sdvo_regs.h
psb_intel_sdvo.c drm: Pass 'name' to drm_encoder_init() 2015-12-11 09:13:20 +01:00
psb_irq.c drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
psb_irq.h drm/irq: Use unsigned int pipe in public API 2015-10-06 12:57:47 +02:00
psb_lid.c
psb_reg.h
tc35876x-dsi-lvds.c
tc35876x-dsi-lvds.h