diff options
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r-- | drivers/video/omap2/displays/panel-taal.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index e6d0954f459f..5f78d3851d91 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c | |||
@@ -847,6 +847,10 @@ static int taal_memory_read(struct omap_dss_device *dssdev, | |||
847 | int first = 1; | 847 | int first = 1; |
848 | int plen; | 848 | int plen; |
849 | unsigned buf_used = 0; | 849 | unsigned buf_used = 0; |
850 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); | ||
851 | |||
852 | if (!td->enabled) | ||
853 | return -ENODEV; | ||
850 | 854 | ||
851 | if (size < w * h * 3) | 855 | if (size < w * h * 3) |
852 | return -ENOMEM; | 856 | return -ENOMEM; |
@@ -855,6 +859,8 @@ static int taal_memory_read(struct omap_dss_device *dssdev, | |||
855 | dssdev->panel.timings.x_res * | 859 | dssdev->panel.timings.x_res * |
856 | dssdev->panel.timings.y_res * 3); | 860 | dssdev->panel.timings.y_res * 3); |
857 | 861 | ||
862 | dsi_bus_lock(); | ||
863 | |||
858 | /* plen 1 or 2 goes into short packet. until checksum error is fixed, | 864 | /* plen 1 or 2 goes into short packet. until checksum error is fixed, |
859 | * use short packets. plen 32 works, but bigger packets seem to cause | 865 | * use short packets. plen 32 works, but bigger packets seem to cause |
860 | * an error. */ | 866 | * an error. */ |
@@ -863,11 +869,11 @@ static int taal_memory_read(struct omap_dss_device *dssdev, | |||
863 | else | 869 | else |
864 | plen = 2; | 870 | plen = 2; |
865 | 871 | ||
866 | taal_setup_update(dssdev, x, y, w, h); | 872 | taal_set_update_window(x, y, w, h); |
867 | 873 | ||
868 | r = dsi_vc_set_max_rx_packet_size(TCH, plen); | 874 | r = dsi_vc_set_max_rx_packet_size(TCH, plen); |
869 | if (r) | 875 | if (r) |
870 | return r; | 876 | goto err0; |
871 | 877 | ||
872 | while (buf_used < size) { | 878 | while (buf_used < size) { |
873 | u8 dcs_cmd = first ? 0x2e : 0x3e; | 879 | u8 dcs_cmd = first ? 0x2e : 0x3e; |
@@ -900,7 +906,8 @@ static int taal_memory_read(struct omap_dss_device *dssdev, | |||
900 | 906 | ||
901 | err: | 907 | err: |
902 | dsi_vc_set_max_rx_packet_size(TCH, 1); | 908 | dsi_vc_set_max_rx_packet_size(TCH, 1); |
903 | 909 | err0: | |
910 | dsi_bus_unlock(); | ||
904 | return r; | 911 | return r; |
905 | } | 912 | } |
906 | 913 | ||