Pass data lines and pixel format info from panel driver to interface
cover Pass data lines and pixel format info from panel driver to interface
This is a continuation of the work started in the series:
http://marc.info/?l=linux-omap&m=134381744304672&w=2
This makes the panel driver call interface specific functions to configure the data lines and pixel format requested by the panel.
Configuration of data lines doesn't happen for DSI or HDMI. For DSI, this information is more complex and is taken care by omapdss_dsi_configure_pins(), for HDMI, the number of TMDS lines is always fixed.
Configuration of pixel format is done only for DSI in command mode and RFBI. Currently, these new functions take different arguments, omapdss_dsi_set_pixel_format() takes pixel format of type omap_dss_dsi_pixel_format enum, and RFBI omapdss_rfbi_set_pixel_size() takes the pixel size directly. It would be good if these could be merged by using some sort of MIPI standard for pixel formats. Having the same argument would help in having a common interface op in the future.
Reference tree:
git://gitorious.org/~boddob/linux-omap-dss2/archit-dss2-clone.git pass_timings_and_others
Archit Taneja (5):
OMAPDSS: DSI: Maintain copy of pixel format in driver data
OMAPDSS: RFBI: Maintain copy of pixel size in driver data
OMAPDSS: RFBI: Maintain copy of number of data lines in driver data
OMAPDSS: DPI: Maitain copy of number of data lines in driver data
OMAPDSS: SDI: Maintain copy of data pairs in driver data
drivers/video/omap2/displays/panel-acx565akm.c | 1 + drivers/video/omap2/displays/panel-generic-dpi.c | 1 + .../omap2/displays/panel-lgphilips-lb035q02.c | 1 + drivers/video/omap2/displays/panel-n8x0.c | 13 ++++++-- .../omap2/displays/panel-nec-nl8048hl11-01b.c | 1 + drivers/video/omap2/displays/panel-picodlp.c | 1 + .../video/omap2/displays/panel-sharp-ls037v7dw01.c | 1 + drivers/video/omap2/displays/panel-taal.c | 1 + drivers/video/omap2/displays/panel-tfp410.c | 1 + .../video/omap2/displays/panel-tpo-td043mtea1.c | 1 + drivers/video/omap2/dss/dpi.c | 13 +++++++- drivers/video/omap2/dss/dsi.c | 34 ++++++++++++++------ drivers/video/omap2/dss/dss.c | 2 +- drivers/video/omap2/dss/dss.h | 2 +- drivers/video/omap2/dss/rfbi.c | 28 ++++++++++++---- drivers/video/omap2/dss/sdi.c | 10 +++++- include/video/omapdss.h | 9 +++++- 17 files changed, 97 insertions(+), 23 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/5 OMAPDSS: DSI: Maintain copy of pixel format in driver data
The DSI driver currently relies on the omap_dss_device struct to receive the desired pixel format of the panel. This makes the DSI interface driver dependent on the omap_dss_device struct.
Make the DSI driver data maintain it's own pixel format field. The panel driver is expected to call omapdss_dsi_set_pixel_format() to configure the pixel format before the interface is enabled.
--- drivers/video/omap2/displays/panel-taal.c | 1 + drivers/video/omap2/dss/dsi.c | 34 +++++++++++++++++++++-------- include/video/omapdss.h | 2 ++ 3 files changed, 28 insertions(+), 9 deletions(-)
drivers/video/omap2/displays/panel-taal.c +1 -0
@@ -1062,6 +1062,7 @@ static int taal_power_on(struct omap_dss_device *dssdev)omapdss_dsi_set_size (dssdev, dssdev->panel.timings.x_res, dssdev->panel.timings.y_res); +omapdss_dsi_set_pixel_format (dssdev, dssdev->panel.dsi_pix_fmt); r =omapdss_dsi_display_enable (dssdev);if (r) {
drivers/video/omap2/dss/dsi.c +25 -9
@@ -334,6 +334,7 @@ struct dsi_data {struct dss_lcd_mgr_config mgr_config;struct omap_video_timings timings; +enum omap_dss_dsi_pixel_format pix_fmt; };struct dsi_packet_sent_handler_data {
@@ -3609,7 +3610,7 @@ static void dsi_config_vp_num_line_buffers(struct omap_dss_device *dssdev)if (dssdev->panel.dsi_mode ==OMAP_DSS_DSI_VIDEO_MODE ) {struct dsi_data *dsi =dsi_get_dsidrv_data (dsidev); -int bpp =dsi_get_pixel_size (dssdev->panel.dsi_pix_fmt); +int bpp =dsi_get_pixel_size (dsi->pix_fmt);unsigned line_buf_size =dsi_get_line_buf_size (dsidev);struct omap_video_timings *timings = &dsi->timings;/*
@@ -3741,7 +3742,7 @@ static void dsi_config_cmd_mode_interleaving(struct omap_dss_device *dssdev)int tclk_trail, ths_exit, exiths_clk;bool ddr_alwon;struct omap_video_timings *timings = &dsi->timings; -int bpp =dsi_get_pixel_size (dssdev->panel.dsi_pix_fmt); +int bpp =dsi_get_pixel_size (dsi->pix_fmt);int ndl = dsi->num_lanes_used -1 ;const struct omapdss_clock_config *clks;int dsi_fclk_hsdiv;
@@ -3856,6 +3857,7 @@ static void dsi_config_cmd_mode_interleaving(struct omap_dss_device *dssdev)static int dsi_proto_config (struct omap_dss_device *dssdev) {struct platform_device *dsidev =dsi_get_dsidev_from_dssdev (dssdev); +struct dsi_data *dsi =dsi_get_dsidrv_data (dsidev);u32 r;int buswidth =0 ;
@@ -3875,7 +3877,7 @@ static int dsi_proto_config(struct omap_dss_device *dssdev)dsi_set_lp_rx_timeout (dsidev,0x1fff , true, true);dsi_set_hs_tx_timeout (dsidev,0x1fff , true, true); -switch (dsi_get_pixel_size (dssdev->panel.dsi_pix_fmt)) { +switch (dsi_get_pixel_size (dsi->pix_fmt)) {case 16 : buswidth =0 ;break ;
@@ -3999,7 +4001,7 @@ static void dsi_proto_timings(struct omap_dss_device *dssdev)int window_sync = dssdev->panel.dsi_vm_data.window_sync;bool hsync_end = dssdev->panel.dsi_vm_data.vp_hsync_end;struct omap_video_timings *timings = &dsi->timings; -int bpp =dsi_get_pixel_size (dssdev->panel.dsi_pix_fmt); +int bpp =dsi_get_pixel_size (dsi->pix_fmt);int tl, t_he, width_bytes; t_he = hsync_end ?
@@ -4108,13 +4110,13 @@ int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel) {struct platform_device *dsidev =dsi_get_dsidev_from_dssdev (dssdev);struct dsi_data *dsi =dsi_get_dsidrv_data (dsidev); -int bpp =dsi_get_pixel_size (dssdev->panel.dsi_pix_fmt); +int bpp =dsi_get_pixel_size (dsi->pix_fmt);u8 data_type;u16 word_count;int r;if (dssdev->panel.dsi_mode ==OMAP_DSS_DSI_VIDEO_MODE ) { -switch (dssdev->panel.dsi_pix_fmt) { +switch (dsi->pix_fmt) {case OMAP_DSS_DSI_FMT_RGB888 : data_type =MIPI_DSI_PACKED_PIXEL_STREAM_24 ;break ;
@@ -4201,7 +4203,7 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev)dsi_vc_config_source (dsidev, channel,DSI_VC_SOURCE_VP ); - bytespp =dsi_get_pixel_size (dssdev->panel.dsi_pix_fmt) /8 ; + bytespp =dsi_get_pixel_size (dsi->pix_fmt) /8 ; bytespl = w * bytespp; bytespf = bytespl * h;
@@ -4338,7 +4340,7 @@ int omap_dsi_update(struct omap_dss_device *dssdev, int channel,#ifdef DEBUG dsi->update_bytes = dw * dh * -dsi_get_pixel_size (dssdev->panel.dsi_pix_fmt) /8 ; +dsi_get_pixel_size (dsi->pix_fmt) /8 ;#endif dsi_update_screen_dispc (dssdev);
@@ -4438,7 +4440,7 @@ static int dsi_display_init_dispc(struct omap_dss_device *dssdev) dsi->mgr_config.io_pad_mode =DSS_IO_PAD_MODE_BYPASS ; dsi->mgr_config.video_port_width = -dsi_get_pixel_size (dssdev->panel.dsi_pix_fmt); +dsi_get_pixel_size (dsi->pix_fmt); dsi->mgr_config.lcden_sig_polarity =0 ;dss_mgr_set_lcd_config (dssdev->manager, &dsi->mgr_config);
@@ -4714,6 +4716,20 @@ void omapdss_dsi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) }EXPORT_SYMBOL (omapdss_dsi_set_size); +void omapdss_dsi_set_pixel_format (struct omap_dss_device *dssdev, +enum omap_dss_dsi_pixel_format fmt) +{ +struct platform_device *dsidev =dsi_get_dsidev_from_dssdev (dssdev); +struct dsi_data *dsi =dsi_get_dsidrv_data (dsidev); + +mutex_lock (&dsi->lock); + + dsi->pix_fmt = fmt; + +mutex_unlock (&dsi->lock); +} +EXPORT_SYMBOL (omapdss_dsi_set_pixel_format); +static int __init dsi_init_display (struct omap_dss_device *dssdev) {struct platform_device *dsidev =dsi_get_dsidev_from_dssdev (dssdev);
include/video/omapdss.h +2 -0
@@ -739,6 +739,8 @@ int omapdss_dsi_enable_te(struct omap_dss_device *dssdev, bool enable);void omapdss_dsi_set_timings (struct omap_dss_device *dssdev,struct omap_video_timings *timings);void omapdss_dsi_set_size (struct omap_dss_device *dssdev,u16 w,u16 h); +void omapdss_dsi_set_pixel_format (struct omap_dss_device *dssdev, +enum omap_dss_dsi_pixel_format fmt);int omap_dsi_update (struct omap_dss_device *dssdev,int channel,void (*callback)(int ,void *),void *data);
Signature · 1 line
1.7.9.5
PATCH 2/5 OMAPDSS: RFBI: Maintain copy of pixel size in driver data
In reply to Archit TanejaThe RFBI driver currently relies on the omap_dss_device struct to receive the desired pixel size of the panel. This makes the RFBI interface driver dependent on the omap_dss_device struct.
Make the RFBI driver data maintain it's own pixel format field. A panel driver is expected to call omapdss_rfbi_set_pixel_size() to configure the pixel format before enabling the interface or calling omap_rfbi_configure().
--- drivers/video/omap2/displays/panel-n8x0.c | 10 ++++++++-- drivers/video/omap2/dss/rfbi.c | 21 ++++++++++++++------- include/video/omapdss.h | 5 +++-- 3 files changed, 25 insertions(+), 11 deletions(-)
drivers/video/omap2/displays/panel-n8x0.c +8 -2
@@ -150,11 +150,15 @@ static void blizzard_ctrl_setup_update(struct omap_dss_device *dssdev, BLIZZARD_SRC_WRITE_LCD :BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE ; -omap_rfbi_configure (dssdev,16 ,8 ); +omapdss_rfbi_set_pixel_size (dssdev,16 ); + +omap_rfbi_configure (dssdev,8 );blizzard_write (BLIZZARD_INPUT_WIN_X_START_0 , tmp,18 ); -omap_rfbi_configure (dssdev,16 ,16 ); +omapdss_rfbi_set_pixel_size (dssdev,16 ); + +omap_rfbi_configure (dssdev,16 ); } static void mipid_transfer(struct spi_device *spi, int cmd, const u8 *wbuf,
@@ -297,6 +301,8 @@ static int n8x0_panel_power_on(struct omap_dss_device *dssdev) goto err_plat_en; } +omapdss_rfbi_set_pixel_size (dssdev, dssdev->ctrl.pixel_size); + r =omapdss_rfbi_display_enable (dssdev);if (r) goto err_rfbi_en;
drivers/video/omap2/dss/rfbi.c +14 -7
@@ -111,6 +111,8 @@ static struct {struct omap_dss_device *dssdev[2 ];struct semaphore bus_lock; + +int pixel_size; } rfbi;static inline void rfbi_write_reg (const struct rfbi_reg idx,u32 val)
@@ -770,13 +772,19 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines)return 0 ; } -int omap_rfbi_configure (struct omap_dss_device *dssdev,int pixel_size, -int data_lines) +int omap_rfbi_configure (struct omap_dss_device *dssdev,int data_lines) { -return rfbi_configure (dssdev->phy.rfbi.channel, pixel_size, data_lines); +return rfbi_configure (dssdev->phy.rfbi.channel, rfbi.pixel_size, + data_lines); }EXPORT_SYMBOL (omap_rfbi_configure); +void omapdss_rfbi_set_pixel_size (struct omap_dss_device *dssdev,int pixel_size) +{ + rfbi.pixel_size = pixel_size; +} +EXPORT_SYMBOL (omapdss_rfbi_set_pixel_size); +int omap_rfbi_prepare_update (struct omap_dss_device *dssdev,u16 *x,u16 *y,u16 *w,u16 *h) {
@@ -877,7 +885,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev)/* Do we need fifohandcheck for RFBI? */ mgr_config.fifohandcheck = false; - mgr_config.video_port_width = dssdev->ctrl.pixel_size; + mgr_config.video_port_width = rfbi.pixel_size; mgr_config.lcden_sig_polarity =0 ;dss_mgr_set_lcd_config (dssdev->manager, &mgr_config);
@@ -911,9 +919,8 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev)rfbi_config_lcd_manager (dssdev); -rfbi_configure (dssdev->phy.rfbi.channel, - dssdev->ctrl.pixel_size, - dssdev->phy.rfbi.data_lines); +rfbi_configure (dssdev->phy.rfbi.channel, rfbi.pixel_size, + dssdev->phy.rfbi.data_lines);rfbi_set_timings (dssdev->phy.rfbi.channel, &dssdev->ctrl.rfbi_timings);
include/video/omapdss.h +3 -2
@@ -773,7 +773,8 @@ int omap_rfbi_prepare_update(struct omap_dss_device *dssdev,int omap_rfbi_update (struct omap_dss_device *dssdev,u16 x,u16 y,u16 w,u16 h,void (*callback)(void *),void *data); -int omap_rfbi_configure (struct omap_dss_device *dssdev,int pixel_size, -int data_lines); +int omap_rfbi_configure (struct omap_dss_device *dssdev,int data_lines); +void omapdss_rfbi_set_pixel_size (struct omap_dss_device *dssdev, +int pixel_size);#endif
Signature · 1 line
1.7.9.5
PATCH 3/5 OMAPDSS: RFBI: Maintain copy of number of data lines in driver data
In reply to Archit TanejaThe RFBI driver currently relies on the omap_dss_device struct to configure the number of data lines as specified by the panel. This makes the RFBI interface driver dependent on the omap_dss_device struct.
Make the RFBI driver data maintain it's own data lines field. A panel driver is expected to call omapdss_rfbi_set_data_lines() to configure the pixel format before enabling the interface or calling omap_rfbi_configure().
--- drivers/video/omap2/displays/panel-n8x0.c | 7 +++++-- drivers/video/omap2/dss/rfbi.c | 13 ++++++++++--- include/video/omapdss.h | 4 +++- 3 files changed, 18 insertions(+), 6 deletions(-)
drivers/video/omap2/displays/panel-n8x0.c +5 -2
@@ -151,14 +151,16 @@ static void blizzard_ctrl_setup_update(struct omap_dss_device *dssdev,BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE ;omapdss_rfbi_set_pixel_size (dssdev,16 ); +omapdss_rfbi_set_data_lines (dssdev,8 ); -omap_rfbi_configure (dssdev,8 ); +omap_rfbi_configure (dssdev);blizzard_write (BLIZZARD_INPUT_WIN_X_START_0 , tmp,18 );omapdss_rfbi_set_pixel_size (dssdev,16 ); +omapdss_rfbi_set_data_lines (dssdev,16 ); -omap_rfbi_configure (dssdev,16 ); +omap_rfbi_configure (dssdev); } static void mipid_transfer(struct spi_device *spi, int cmd, const u8 *wbuf,
@@ -302,6 +304,7 @@ static int n8x0_panel_power_on(struct omap_dss_device *dssdev) }omapdss_rfbi_set_pixel_size (dssdev, dssdev->ctrl.pixel_size); +omapdss_rfbi_set_data_lines (dssdev, dssdev->phy.rfbi.data_lines); r =omapdss_rfbi_display_enable (dssdev);if (r)
drivers/video/omap2/dss/rfbi.c +10 -3
@@ -113,6 +113,7 @@ static struct {struct semaphore bus_lock;int pixel_size; +int data_lines; } rfbi;static inline void rfbi_write_reg (const struct rfbi_reg idx,u32 val)
@@ -772,10 +773,10 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines)return 0 ; } -int omap_rfbi_configure (struct omap_dss_device *dssdev,int data_lines) +int omap_rfbi_configure (struct omap_dss_device *dssdev) {return rfbi_configure (dssdev->phy.rfbi.channel, rfbi.pixel_size, - data_lines); + rfbi.data_lines); }EXPORT_SYMBOL (omap_rfbi_configure);
@@ -785,6 +786,12 @@ void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) }EXPORT_SYMBOL (omapdss_rfbi_set_pixel_size); +void omapdss_rfbi_set_data_lines (struct omap_dss_device *dssdev,int data_lines) +{ + rfbi.data_lines = data_lines; +} +EXPORT_SYMBOL (omapdss_rfbi_set_data_lines); +int omap_rfbi_prepare_update (struct omap_dss_device *dssdev,u16 *x,u16 *y,u16 *w,u16 *h) {
@@ -920,7 +927,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev)rfbi_config_lcd_manager (dssdev);rfbi_configure (dssdev->phy.rfbi.channel, rfbi.pixel_size, - dssdev->phy.rfbi.data_lines); + rfbi.data_lines);rfbi_set_timings (dssdev->phy.rfbi.channel, &dssdev->ctrl.rfbi_timings);
include/video/omapdss.h +3 -1
@@ -773,8 +773,10 @@ int omap_rfbi_prepare_update(struct omap_dss_device *dssdev,int omap_rfbi_update (struct omap_dss_device *dssdev,u16 x,u16 y,u16 w,u16 h,void (*callback)(void *),void *data); -int omap_rfbi_configure (struct omap_dss_device *dssdev,int data_lines); +int omap_rfbi_configure (struct omap_dss_device *dssdev);void omapdss_rfbi_set_pixel_size (struct omap_dss_device *dssdev,int pixel_size); +void omapdss_rfbi_set_data_lines (struct omap_dss_device *dssdev, +int data_lines);#endif
Signature · 1 line
1.7.9.5
PATCH 4/5 OMAPDSS: DPI: Maitain copy of number of data lines in driver data
In reply to Archit TanejaThe DPI driver currently relies on the omap_dss_device struct to configure the number of data lines as specified by the panel. This makes the DPI interface driver dependent on the omap_dss_device struct.
Make the DPI driver data maintain it's own data lines field. A panel driver is expected to call omapdss_dpi_set_data_lines() before enabling the interface.
--- drivers/video/omap2/displays/panel-generic-dpi.c | 1 + .../omap2/displays/panel-lgphilips-lb035q02.c | 1 + .../omap2/displays/panel-nec-nl8048hl11-01b.c | 1 + drivers/video/omap2/displays/panel-picodlp.c | 1 + .../video/omap2/displays/panel-sharp-ls037v7dw01.c | 1 + drivers/video/omap2/displays/panel-tfp410.c | 1 + .../video/omap2/displays/panel-tpo-td043mtea1.c | 1 + drivers/video/omap2/dss/dpi.c | 13 ++++++++++++- include/video/omapdss.h | 1 + 9 files changed, 20 insertions(+), 1 deletion(-)
drivers/video/omap2/displays/panel-generic-dpi.c +1 -0
@@ -566,6 +566,7 @@ static int generic_dpi_panel_power_on(struct omap_dss_device *dssdev)return 0 ;omapdss_dpi_set_timings (dssdev, &dssdev->panel.timings); +omapdss_dpi_set_data_lines (dssdev, dssdev->phy.dpi.data_lines); r =omapdss_dpi_display_enable (dssdev);if (r)
drivers/video/omap2/displays/panel-lgphilips-lb035q02.c +1 -0
@@ -56,6 +56,7 @@ static int lb035q02_panel_power_on(struct omap_dss_device *dssdev)return 0 ;omapdss_dpi_set_timings (dssdev, &dssdev->panel.timings); +omapdss_dpi_set_data_lines (dssdev, dssdev->phy.dpi.data_lines); r =omapdss_dpi_display_enable (dssdev);if (r)
drivers/video/omap2/displays/panel-nec-nl8048hl11-01b.c +1 -0
@@ -176,6 +176,7 @@ static int nec_8048_panel_power_on(struct omap_dss_device *dssdev)return 0 ;omapdss_dpi_set_timings (dssdev, &dssdev->panel.timings); +omapdss_dpi_set_data_lines (dssdev, dssdev->phy.dpi.data_lines); r =omapdss_dpi_display_enable (dssdev);if (r)
drivers/video/omap2/displays/panel-picodlp.c +1 -0
@@ -379,6 +379,7 @@ static int picodlp_panel_power_on(struct omap_dss_device *dssdev)msleep (1000 );omapdss_dpi_set_timings (dssdev, &dssdev->panel.timings); +omapdss_dpi_set_data_lines (dssdev, dssdev->phy.dpi.data_lines); r =omapdss_dpi_display_enable (dssdev);if (r) {
drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c +1 -0
@@ -143,6 +143,7 @@ static int sharp_ls_power_on(struct omap_dss_device *dssdev)return 0 ;omapdss_dpi_set_timings (dssdev, &dssdev->panel.timings); +omapdss_dpi_set_data_lines (dssdev, dssdev->phy.dpi.data_lines); r =omapdss_dpi_display_enable (dssdev);if (r)
drivers/video/omap2/displays/panel-tfp410.c +1 -0
@@ -66,6 +66,7 @@ static int tfp410_power_on(struct omap_dss_device *dssdev)return 0 ;omapdss_dpi_set_timings (dssdev, &dssdev->panel.timings); +omapdss_dpi_set_data_lines (dssdev, dssdev->phy.dpi.data_lines); r =omapdss_dpi_display_enable (dssdev);if (r)
drivers/video/omap2/displays/panel-tpo-td043mtea1.c +1 -0
@@ -338,6 +338,7 @@ static int tpo_td043_enable_dss(struct omap_dss_device *dssdev)return 0 ;omapdss_dpi_set_timings (dssdev, &dssdev->panel.timings); +omapdss_dpi_set_data_lines (dssdev, dssdev->phy.dpi.data_lines); r =omapdss_dpi_display_enable (dssdev);if (r)
drivers/video/omap2/dss/dpi.c +12 -1
@@ -43,6 +43,7 @@ static struct {struct omap_video_timings timings;struct dss_lcd_mgr_config mgr_config; +int data_lines; } dpi;static struct platform_device *dpi_get_dsidev (enum omap_dss_clk_source clk)
@@ -176,7 +177,7 @@ static void dpi_config_lcd_manager(struct omap_dss_device *dssdev) dpi.mgr_config.stallmode = false; dpi.mgr_config.fifohandcheck = false; - dpi.mgr_config.video_port_width = dssdev->phy.dpi.data_lines; + dpi.mgr_config.video_port_width = dpi.data_lines; dpi.mgr_config.lcden_sig_polarity =0 ;
@@ -368,6 +369,16 @@ int dpi_check_timings(struct omap_dss_device *dssdev, }EXPORT_SYMBOL (dpi_check_timings); +void omapdss_dpi_set_data_lines (struct omap_dss_device *dssdev,int data_lines) +{ +mutex_lock (&dpi.lock); + + dpi.data_lines = data_lines; + +mutex_unlock (&dpi.lock); +} +EXPORT_SYMBOL (omapdss_dpi_set_data_lines); +static int __init dpi_init_display (struct omap_dss_device *dssdev) {DSSDBG ("init_display\n" );
include/video/omapdss.h +1 -0
@@ -760,6 +760,7 @@ void omapdss_dpi_set_timings(struct omap_dss_device *dssdev, struct omap_video_timings *timings);int dpi_check_timings (struct omap_dss_device *dssdev,struct omap_video_timings *timings); +void omapdss_dpi_set_data_lines (struct omap_dss_device *dssdev,int data_lines);int omapdss_sdi_display_enable (struct omap_dss_device *dssdev);void omapdss_sdi_display_disable (struct omap_dss_device *dssdev);
Signature · 1 line
1.7.9.5
PATCH 5/5 OMAPDSS: SDI: Maintain copy of data pairs in driver data
In reply to Archit TanejaThe SDI driver currently relies on the omap_dss_device struct to configure the number of data pairs as specified by the panel. This makes the SDI interface driver dependent on the omap_dss_device struct.
Make the SDI driver data maintain it's own data lines field. A panel driver is expected to call omapdss_sdi_set_datapairs() before enabling the interface. Even though we configure the number of data pairs here, this function would be finally mapped to a generic interface op called set_data_lines. The datapairs argument type has been changed from u8 to int at some places to be in sync with the 'set_data_lines' ops of other interfaces.
--- drivers/video/omap2/displays/panel-acx565akm.c | 1 + drivers/video/omap2/dss/dss.c | 2 +- drivers/video/omap2/dss/dss.h | 2 +- drivers/video/omap2/dss/sdi.c | 10 +++++++++- include/video/omapdss.h | 1 + 5 files changed, 13 insertions(+), 3 deletions(-)
drivers/video/omap2/displays/panel-acx565akm.c +1 -0
@@ -601,6 +601,7 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev)mutex_lock (&md->mutex);omapdss_sdi_set_timings (dssdev, &dssdev->panel.timings); +omapdss_sdi_set_datapairs (dssdev, dssdev->phy.sdi.datapairs); r =omapdss_sdi_display_enable (dssdev);if (r) {
drivers/video/omap2/dss/dss.c +1 -1
@@ -144,7 +144,7 @@ static void dss_restore_context(void)#undef SR#undef RR -void dss_sdi_init (u8 datapairs) +void dss_sdi_init (int datapairs) {u32 l;
drivers/video/omap2/dss/dss.h +1 -1
@@ -280,7 +280,7 @@ void dss_dump_clocks(struct seq_file *s);void dss_debug_dump_clocks (struct seq_file *s);#endif -void dss_sdi_init (u8 datapairs); +void dss_sdi_init (int datapairs);int dss_sdi_enable (void );void dss_sdi_disable (void );
drivers/video/omap2/dss/sdi.c +9 -1
@@ -35,6 +35,7 @@ static struct {struct dss_lcd_mgr_config mgr_config;struct omap_video_timings timings; +int datapairs; } sdi;static void sdi_config_lcd_manager (struct omap_dss_device *dssdev)
@@ -106,7 +107,8 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)sdi_config_lcd_manager (dssdev); -dss_sdi_init (dssdev->phy.sdi.datapairs); +dss_sdi_init (sdi.datapairs); + r =dss_sdi_enable ();if (r) goto err_sdi_enable;
@@ -164,6 +166,12 @@ void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, }EXPORT_SYMBOL (omapdss_sdi_set_timings); +void omapdss_sdi_set_datapairs (struct omap_dss_device *dssdev,int datapairs) +{ + sdi.datapairs = datapairs; +} +EXPORT_SYMBOL (omapdss_sdi_set_datapairs); +static int __init sdi_init_display (struct omap_dss_device *dssdev) {DSSDBG ("SDI init\n" );
include/video/omapdss.h +1 -0
@@ -766,6 +766,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev);void omapdss_sdi_display_disable (struct omap_dss_device *dssdev);void omapdss_sdi_set_timings (struct omap_dss_device *dssdev,struct omap_video_timings *timings); +void omapdss_sdi_set_datapairs (struct omap_dss_device *dssdev,int datapairs);int omapdss_rfbi_display_enable (struct omap_dss_device *dssdev);void omapdss_rfbi_display_disable (struct omap_dss_device *dssdev);
Signature · 1 line
1.7.9.5
Quoted 11 lines · Archit Taneja
This is a continuation of the work started in the series:
http://marc.info/?l=linux-omap&m=134381744304672&w=2
This makes the panel driver call interface specific functions to configure the data lines and pixel format requested by the panel.
Configuration of data lines doesn't happen for DSI or HDMI. For DSI, this information is more complex and is taken care by
omapdss_dsi_configure_pins(), for HDMI, the number of TMDS lines is always fixed.
Quoted 7 lines
Configuration of pixel format is done only for DSI in command mode and RFBI. Currently, these new functions take different arguments,
omapdss_dsi_set_pixel_format()takes pixel format of typeomap_dss_dsi_pixel_formatenum, and RFBIomapdss_rfbi_set_pixel_size()takes the pixel size directly. It would be good if these could be merged by using some sort of MIPI standard for pixel formats. Having the same argument would help in having a common interface op in the future.
This series looks good.
Tomi