Commit 7967ef6a authored by Jani Nikula's avatar Jani Nikula

drm/i915/dsi: remove support for more than one panel driver

Fact is, there are no other panel drivers except the VBT based
one. Simplify the code and maintenance. No functional changes.
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarBob Paauwe <bob.j.paauwe@intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Cc: Madhav Chauhan <madhav.chauhan@intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/7dfd041dd25e8e930150ede09589bb232f6248d5.1488810382.git.jani.nikula@intel.com
parent d2fa80a5
...@@ -36,16 +36,6 @@ ...@@ -36,16 +36,6 @@
#include "intel_drv.h" #include "intel_drv.h"
#include "intel_dsi.h" #include "intel_dsi.h"
static const struct {
u16 panel_id;
struct drm_panel * (*init)(struct intel_dsi *intel_dsi, u16 panel_id);
} intel_dsi_drivers[] = {
{
.panel_id = MIPI_DSI_GENERIC_PANEL_ID,
.init = vbt_panel_init,
},
};
/* return pixels in terms of txbyteclkhs */ /* return pixels in terms of txbyteclkhs */
static u16 txbyteclkhs(u16 pixels, int bpp, int lane_count, static u16 txbyteclkhs(u16 pixels, int bpp, int lane_count,
u16 burst_mode_ratio) u16 burst_mode_ratio)
...@@ -1709,7 +1699,6 @@ void intel_dsi_init(struct drm_i915_private *dev_priv) ...@@ -1709,7 +1699,6 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
struct drm_connector *connector; struct drm_connector *connector;
struct drm_display_mode *scan, *fixed_mode = NULL; struct drm_display_mode *scan, *fixed_mode = NULL;
enum port port; enum port port;
unsigned int i;
DRM_DEBUG_KMS("\n"); DRM_DEBUG_KMS("\n");
...@@ -1816,13 +1805,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv) ...@@ -1816,13 +1805,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
intel_dsi->dsi_hosts[port] = host; intel_dsi->dsi_hosts[port] = host;
} }
for (i = 0; i < ARRAY_SIZE(intel_dsi_drivers); i++) { intel_dsi->panel = intel_dsi_vbt_init(intel_dsi, MIPI_DSI_GENERIC_PANEL_ID);
intel_dsi->panel = intel_dsi_drivers[i].init(intel_dsi,
intel_dsi_drivers[i].panel_id);
if (intel_dsi->panel)
break;
}
if (!intel_dsi->panel) { if (!intel_dsi->panel) {
DRM_DEBUG_KMS("no device found\n"); DRM_DEBUG_KMS("no device found\n");
goto err; goto err;
......
...@@ -146,7 +146,7 @@ u32 intel_dsi_get_pclk(struct intel_encoder *encoder, int pipe_bpp, ...@@ -146,7 +146,7 @@ u32 intel_dsi_get_pclk(struct intel_encoder *encoder, int pipe_bpp,
void intel_dsi_reset_clocks(struct intel_encoder *encoder, void intel_dsi_reset_clocks(struct intel_encoder *encoder,
enum port port); enum port port);
struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id); struct drm_panel *intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id);
enum mipi_dsi_pixel_format pixel_format_from_register_bits(u32 fmt); enum mipi_dsi_pixel_format pixel_format_from_register_bits(u32 fmt);
#endif /* _INTEL_DSI_H */ #endif /* _INTEL_DSI_H */
...@@ -518,7 +518,7 @@ static const struct drm_panel_funcs vbt_panel_funcs = { ...@@ -518,7 +518,7 @@ static const struct drm_panel_funcs vbt_panel_funcs = {
.get_modes = vbt_panel_get_modes, .get_modes = vbt_panel_get_modes,
}; };
struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id) struct drm_panel *intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)
{ {
struct drm_device *dev = intel_dsi->base.base.dev; struct drm_device *dev = intel_dsi->base.base.dev;
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment