diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-10-09 22:16:30 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-10-09 22:16:30 -0400 |
commit | 0febd3bccff3ac005a570180209e44fb7de188df (patch) | |
tree | 2af5177fb8fef95900f68c64121ad6bdc78d8761 /drivers/video/omap2/displays/panel-n8x0.c | |
parent | 8d93241b923bcb6a60994f8ed20fda8cc06d0fda (diff) | |
parent | 13b1ba7de8d0ecc42e4f9c002d5b0c1a48f05e58 (diff) |
Merge tag 'omapdss-for-3.7' of git://gitorious.org/linux-omap-dss2/linux into fbdev-next
Omapdss driver changes for the 3.7 merge window.
Notable changes:
* Basic writeback support for DISPC level. Writeback is not yet usable, though,
as we need higher level code to actually expose the writeback feature to
userspace.
* Rewriting the omapdss output drivers. We're trying to remove the hard links
between the omapdss and the panels, and this rewrite work moves us closer to
that goal.
* Cleanup and restructuring patches that have been made while working on device
tree support for omapdss. Device tree support is still some way ahead, but
these patches are good cleanups in themselves.
* Basic OMAP5 DSS support for DPI and DSI outputs.
* Workaround for the problem that GFX overlay's fifo is too small for high
resolution scenarios, causing underflows.
* Cleanups that remove dependencies to omap platform code.
Diffstat (limited to 'drivers/video/omap2/displays/panel-n8x0.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-n8x0.c | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c index e6c115373c00..3fc5ad081a21 100644 --- a/drivers/video/omap2/displays/panel-n8x0.c +++ b/drivers/video/omap2/displays/panel-n8x0.c | |||
@@ -150,11 +150,17 @@ static void blizzard_ctrl_setup_update(struct omap_dss_device *dssdev, | |||
150 | BLIZZARD_SRC_WRITE_LCD : | 150 | BLIZZARD_SRC_WRITE_LCD : |
151 | BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE; | 151 | BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE; |
152 | 152 | ||
153 | omap_rfbi_configure(dssdev, 16, 8); | 153 | omapdss_rfbi_set_pixel_size(dssdev, 16); |
154 | omapdss_rfbi_set_data_lines(dssdev, 8); | ||
155 | |||
156 | omap_rfbi_configure(dssdev); | ||
154 | 157 | ||
155 | blizzard_write(BLIZZARD_INPUT_WIN_X_START_0, tmp, 18); | 158 | blizzard_write(BLIZZARD_INPUT_WIN_X_START_0, tmp, 18); |
156 | 159 | ||
157 | omap_rfbi_configure(dssdev, 16, 16); | 160 | omapdss_rfbi_set_pixel_size(dssdev, 16); |
161 | omapdss_rfbi_set_data_lines(dssdev, 16); | ||
162 | |||
163 | omap_rfbi_configure(dssdev); | ||
158 | } | 164 | } |
159 | 165 | ||
160 | static void mipid_transfer(struct spi_device *spi, int cmd, const u8 *wbuf, | 166 | static void mipid_transfer(struct spi_device *spi, int cmd, const u8 *wbuf, |
@@ -297,6 +303,12 @@ static int n8x0_panel_power_on(struct omap_dss_device *dssdev) | |||
297 | goto err_plat_en; | 303 | goto err_plat_en; |
298 | } | 304 | } |
299 | 305 | ||
306 | omapdss_rfbi_set_size(dssdev, dssdev->panel.timings.x_res, | ||
307 | dssdev->panel.timings.y_res); | ||
308 | omapdss_rfbi_set_pixel_size(dssdev, dssdev->ctrl.pixel_size); | ||
309 | omapdss_rfbi_set_data_lines(dssdev, dssdev->phy.rfbi.data_lines); | ||
310 | omapdss_rfbi_set_interface_timings(dssdev, &dssdev->ctrl.rfbi_timings); | ||
311 | |||
300 | r = omapdss_rfbi_display_enable(dssdev); | 312 | r = omapdss_rfbi_display_enable(dssdev); |
301 | if (r) | 313 | if (r) |
302 | goto err_rfbi_en; | 314 | goto err_rfbi_en; |
@@ -477,6 +489,7 @@ static int n8x0_panel_probe(struct omap_dss_device *dssdev) | |||
477 | dssdev->panel.timings.y_res = 480; | 489 | dssdev->panel.timings.y_res = 480; |
478 | dssdev->ctrl.pixel_size = 16; | 490 | dssdev->ctrl.pixel_size = 16; |
479 | dssdev->ctrl.rfbi_timings = n8x0_panel_timings; | 491 | dssdev->ctrl.rfbi_timings = n8x0_panel_timings; |
492 | dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE; | ||
480 | 493 | ||
481 | memset(&props, 0, sizeof(props)); | 494 | memset(&props, 0, sizeof(props)); |
482 | props.max_brightness = 127; | 495 | props.max_brightness = 127; |
@@ -625,17 +638,25 @@ static int n8x0_panel_update(struct omap_dss_device *dssdev, | |||
625 | u16 x, u16 y, u16 w, u16 h) | 638 | u16 x, u16 y, u16 w, u16 h) |
626 | { | 639 | { |
627 | struct panel_drv_data *ddata = get_drv_data(dssdev); | 640 | struct panel_drv_data *ddata = get_drv_data(dssdev); |
641 | u16 dw, dh; | ||
628 | 642 | ||
629 | dev_dbg(&dssdev->dev, "update\n"); | 643 | dev_dbg(&dssdev->dev, "update\n"); |
630 | 644 | ||
645 | dw = dssdev->panel.timings.x_res; | ||
646 | dh = dssdev->panel.timings.y_res; | ||
647 | |||
648 | if (x != 0 || y != 0 || w != dw || h != dh) { | ||
649 | dev_err(&dssdev->dev, "invaid update region %d, %d, %d, %d\n", | ||
650 | x, y, w, h); | ||
651 | return -EINVAL; | ||
652 | } | ||
653 | |||
631 | mutex_lock(&ddata->lock); | 654 | mutex_lock(&ddata->lock); |
632 | rfbi_bus_lock(); | 655 | rfbi_bus_lock(); |
633 | 656 | ||
634 | omap_rfbi_prepare_update(dssdev, &x, &y, &w, &h); | ||
635 | |||
636 | blizzard_ctrl_setup_update(dssdev, x, y, w, h); | 657 | blizzard_ctrl_setup_update(dssdev, x, y, w, h); |
637 | 658 | ||
638 | omap_rfbi_update(dssdev, x, y, w, h, update_done, NULL); | 659 | omap_rfbi_update(dssdev, update_done, NULL); |
639 | 660 | ||
640 | mutex_unlock(&ddata->lock); | 661 | mutex_unlock(&ddata->lock); |
641 | 662 | ||