diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-05-15 04:24:30 -0400 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-08-29 09:21:52 -0400 |
| commit | 5cfc1c3cb6f0a5875ea18cc8ea6e0ac4bdde6b95 (patch) | |
| tree | 09af4fef460e8b5878bd63507fcddc926249da49 | |
| parent | 164ebdd1107ad1150033acd0e76e4f16456b5ca6 (diff) | |
OMAPDSS: DSI: remove code related to old panel model
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.
This patch removes the code from the DSI driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Archit Taneja <archit@ti.com>
| -rw-r--r-- | drivers/video/omap2/dss/dsi.c | 271 | ||||
| -rw-r--r-- | include/video/omapdss.h | 51 |
2 files changed, 35 insertions, 287 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 99a043b08f0d..3daaf7ea4281 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
| @@ -205,6 +205,8 @@ static int dsi_display_init_dispc(struct platform_device *dsidev, | |||
| 205 | static void dsi_display_uninit_dispc(struct platform_device *dsidev, | 205 | static void dsi_display_uninit_dispc(struct platform_device *dsidev, |
| 206 | struct omap_overlay_manager *mgr); | 206 | struct omap_overlay_manager *mgr); |
| 207 | 207 | ||
| 208 | static int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel); | ||
| 209 | |||
| 208 | #define DSI_MAX_NR_ISRS 2 | 210 | #define DSI_MAX_NR_ISRS 2 |
| 209 | #define DSI_MAX_NR_LANES 5 | 211 | #define DSI_MAX_NR_LANES 5 |
| 210 | 212 | ||
| @@ -383,16 +385,7 @@ static inline struct dsi_data *dsi_get_dsidrv_data(struct platform_device *dside | |||
| 383 | 385 | ||
| 384 | static inline struct platform_device *dsi_get_dsidev_from_dssdev(struct omap_dss_device *dssdev) | 386 | static inline struct platform_device *dsi_get_dsidev_from_dssdev(struct omap_dss_device *dssdev) |
| 385 | { | 387 | { |
| 386 | /* HACK: dssdev can be either the panel device, when using old API, or | 388 | return to_platform_device(dssdev->dev); |
| 387 | * the dsi device itself, when using the new API. So we solve this for | ||
| 388 | * now by checking the dssdev->id. This will be removed when the old API | ||
| 389 | * is removed. | ||
| 390 | */ | ||
| 391 | if (dssdev->id == OMAP_DSS_OUTPUT_DSI1 || | ||
| 392 | dssdev->id == OMAP_DSS_OUTPUT_DSI2) | ||
| 393 | return to_platform_device(dssdev->dev); | ||
| 394 | |||
| 395 | return to_platform_device(dssdev->output->dev); | ||
| 396 | } | 389 | } |
| 397 | 390 | ||
| 398 | struct platform_device *dsi_get_dsidev_from_id(int module) | 391 | struct platform_device *dsi_get_dsidev_from_id(int module) |
| @@ -432,23 +425,21 @@ static inline u32 dsi_read_reg(struct platform_device *dsidev, | |||
| 432 | return __raw_readl(dsi->base + idx.idx); | 425 | return __raw_readl(dsi->base + idx.idx); |
| 433 | } | 426 | } |
| 434 | 427 | ||
| 435 | void dsi_bus_lock(struct omap_dss_device *dssdev) | 428 | static void dsi_bus_lock(struct omap_dss_device *dssdev) |
| 436 | { | 429 | { |
| 437 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | 430 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
| 438 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | 431 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); |
| 439 | 432 | ||
| 440 | down(&dsi->bus_lock); | 433 | down(&dsi->bus_lock); |
| 441 | } | 434 | } |
| 442 | EXPORT_SYMBOL(dsi_bus_lock); | ||
| 443 | 435 | ||
| 444 | void dsi_bus_unlock(struct omap_dss_device *dssdev) | 436 | static void dsi_bus_unlock(struct omap_dss_device *dssdev) |
| 445 | { | 437 | { |
| 446 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | 438 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
| 447 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | 439 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); |
| 448 | 440 | ||
| 449 | up(&dsi->bus_lock); | 441 | up(&dsi->bus_lock); |
| 450 | } | 442 | } |
| 451 | EXPORT_SYMBOL(dsi_bus_unlock); | ||
| 452 | 443 | ||
| 453 | static bool dsi_bus_is_locked(struct platform_device *dsidev) | 444 | static bool dsi_bus_is_locked(struct platform_device *dsidev) |
| 454 | { | 445 | { |
| @@ -2713,7 +2704,7 @@ static int dsi_vc_config_source(struct platform_device *dsidev, int channel, | |||
| 2713 | return 0; | 2704 | return 0; |
| 2714 | } | 2705 | } |
| 2715 | 2706 | ||
| 2716 | void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, | 2707 | static void dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, |
| 2717 | bool enable) | 2708 | bool enable) |
| 2718 | { | 2709 | { |
| 2719 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | 2710 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
| @@ -2737,7 +2728,6 @@ void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel, | |||
| 2737 | if (dsi->vm_timings.ddr_clk_always_on && enable) | 2728 | if (dsi->vm_timings.ddr_clk_always_on && enable) |
| 2738 | dsi_vc_send_null(dssdev, channel); | 2729 | dsi_vc_send_null(dssdev, channel); |
| 2739 | } | 2730 | } |
| 2740 | EXPORT_SYMBOL(omapdss_dsi_vc_enable_hs); | ||
| 2741 | 2731 | ||
| 2742 | static void dsi_vc_flush_long_data(struct platform_device *dsidev, int channel) | 2732 | static void dsi_vc_flush_long_data(struct platform_device *dsidev, int channel) |
| 2743 | { | 2733 | { |
| @@ -2842,7 +2832,7 @@ static int dsi_vc_send_bta(struct platform_device *dsidev, int channel) | |||
| 2842 | return 0; | 2832 | return 0; |
| 2843 | } | 2833 | } |
| 2844 | 2834 | ||
| 2845 | int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel) | 2835 | static int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel) |
| 2846 | { | 2836 | { |
| 2847 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | 2837 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
| 2848 | DECLARE_COMPLETION_ONSTACK(completion); | 2838 | DECLARE_COMPLETION_ONSTACK(completion); |
| @@ -2885,7 +2875,6 @@ err1: | |||
| 2885 | err0: | 2875 | err0: |
| 2886 | return r; | 2876 | return r; |
| 2887 | } | 2877 | } |
| 2888 | EXPORT_SYMBOL(dsi_vc_send_bta_sync); | ||
| 2889 | 2878 | ||
| 2890 | static inline void dsi_vc_write_long_header(struct platform_device *dsidev, | 2879 | static inline void dsi_vc_write_long_header(struct platform_device *dsidev, |
| 2891 | int channel, u8 data_type, u16 len, u8 ecc) | 2880 | int channel, u8 data_type, u16 len, u8 ecc) |
| @@ -3011,14 +3000,13 @@ static int dsi_vc_send_short(struct platform_device *dsidev, int channel, | |||
| 3011 | return 0; | 3000 | return 0; |
| 3012 | } | 3001 | } |
| 3013 | 3002 | ||
| 3014 | int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel) | 3003 | static int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel) |
| 3015 | { | 3004 | { |
| 3016 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | 3005 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
| 3017 | 3006 | ||
| 3018 | return dsi_vc_send_long(dsidev, channel, MIPI_DSI_NULL_PACKET, NULL, | 3007 | return dsi_vc_send_long(dsidev, channel, MIPI_DSI_NULL_PACKET, NULL, |
| 3019 | 0, 0); | 3008 | 0, 0); |
| 3020 | } | 3009 | } |
| 3021 | EXPORT_SYMBOL(dsi_vc_send_null); | ||
| 3022 | 3010 | ||
| 3023 | static int dsi_vc_write_nosync_common(struct platform_device *dsidev, | 3011 | static int dsi_vc_write_nosync_common(struct platform_device *dsidev, |
| 3024 | int channel, u8 *data, int len, enum dss_dsi_content_type type) | 3012 | int channel, u8 *data, int len, enum dss_dsi_content_type type) |
| @@ -3050,7 +3038,7 @@ static int dsi_vc_write_nosync_common(struct platform_device *dsidev, | |||
| 3050 | return r; | 3038 | return r; |
| 3051 | } | 3039 | } |
| 3052 | 3040 | ||
| 3053 | int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, | 3041 | static int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, |
| 3054 | u8 *data, int len) | 3042 | u8 *data, int len) |
| 3055 | { | 3043 | { |
| 3056 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | 3044 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
| @@ -3058,9 +3046,8 @@ int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, | |||
| 3058 | return dsi_vc_write_nosync_common(dsidev, channel, data, len, | 3046 | return dsi_vc_write_nosync_common(dsidev, channel, data, len, |
| 3059 | DSS_DSI_CONTENT_DCS); | 3047 | DSS_DSI_CONTENT_DCS); |
| 3060 | } | 3048 | } |
| 3061 | EXPORT_SYMBOL(dsi_vc_dcs_write_nosync); | ||
| 3062 | 3049 | ||
| 3063 | int dsi_vc_generic_write_nosync(struct omap_dss_device *dssdev, int channel, | 3050 | static int dsi_vc_generic_write_nosync(struct omap_dss_device *dssdev, int channel, |
| 3064 | u8 *data, int len) | 3051 | u8 *data, int len) |
| 3065 | { | 3052 | { |
| 3066 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); | 3053 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
| @@ -3068,7 +3055,6 @@ int dsi_vc_generic_write_nosync(struct omap_dss_device *dssdev, int channel, | |||
| 3068 | return dsi_vc_write_nosync_common(dsidev, channel, data, len, | 3055 | return dsi_vc_write_nosync_common(dsidev, channel, data, len, |
| 3069 | DSS_DSI_CONTENT_GENERIC); | 3056 | DSS_DSI_CONTENT_GENERIC); |
| 3070 | } | 3057 | } |
| 3071 | EXPORT_SYMBOL(dsi_vc_generic_write_nosync); | ||
| 3072 | 3058 | ||
| 3073 | static int dsi_vc_write_common(struct omap_dss_device *dssdev, int channel, | 3059 | static int dsi_vc_write_common(struct omap_dss_device *dssdev, int channel, |
| 3074 | u8 *data, int len, enum dss_dsi_content_type type) | 3060 | u8 *data, int len, enum dss_dsi_content_type type) |
| @@ -3099,60 +3085,19 @@ err: | |||
| 3099 | return r; | 3085 | return r; |
| 3100 | } | 3086 | } |
| 3101 | 3087 | ||
| 3102 | int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, | 3088 | static int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, |
| 3103 | int len) | 3089 | int len) |
| 3104 | { | 3090 | { |
| 3105 | return dsi_vc_write_common(dssdev, channel, data, len, | 3091 | return dsi_vc_write_common(dssdev, channel, data, len, |
| 3106 | DSS_DSI_CONTENT_DCS); | 3092 | DSS_DSI_CONTENT_DCS); |
| 3107 | } | 3093 | } |
| 3108 | EXPORT_SYMBOL(dsi_vc_dcs_write); | ||
| 3109 | 3094 | ||
| 3110 | int dsi_vc_generic_write(struct omap_dss_device *dssdev, int channel, u8 *data, | 3095 | static int dsi_vc_generic_write(struct omap_dss_device *dssdev, int channel, u8 *data, |
