aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2011-03-01 03:29:46 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-03-11 08:46:28 -0500
commitbc6d4b1d3d9b7568fe88f5bb80d0266a7ef624cc (patch)
tree1903498875413223c82ef76b5499149b6fd01c53 /drivers/video/omap2/displays
parent5ee3c1445dd89342ca8498c14afef82d0f76c794 (diff)
OMAP: DSS2: Use request / release calls in Taal for DSI Virtual Channels.
Taal driver used to take a hard coded Macro for Virtual Channel and the VC_ID. The Taal panel driver now requests for a Virtual channel through the omap_dsi_request_vc() call in taal_probe(). The channel number returned by the request_vc() call is used for sending command and data to the Panel. The DSI driver automatically configures the Virtual Channel's source to either Video Port or L4 Slave port based on what the panel driver is using it for. The driver uses omap_dsi_release_vc() to free the VC specified by the panel. taal_remove() or when a request_vc() call fails. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c123
1 files changed, 71 insertions, 52 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 61026f96ad20..abdfdd81001f 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -218,6 +218,8 @@ struct taal_data {
218 u16 w; 218 u16 w;
219 u16 h; 219 u16 h;
220 } update_region; 220 } update_region;
221 int channel;
222
221 struct delayed_work te_timeout_work; 223 struct delayed_work te_timeout_work;
222 224
223 bool use_dsi_bl; 225 bool use_dsi_bl;
@@ -257,12 +259,12 @@ static void hw_guard_wait(struct taal_data *td)
257 } 259 }
258} 260}
259 261
260static int taal_dcs_read_1(u8 dcs_cmd, u8 *data) 262static int taal_dcs_read_1(struct taal_data *td, u8 dcs_cmd, u8 *data)
261{ 263{
262 int r; 264 int r;
263 u8 buf[1]; 265 u8 buf[1];
264 266
265 r = dsi_vc_dcs_read(TCH, dcs_cmd, buf, 1); 267 r = dsi_vc_dcs_read(td->channel, dcs_cmd, buf, 1);
266 268
267 if (r < 0) 269 if (r < 0)
268 return r; 270 return r;
@@ -272,17 +274,17 @@ static int taal_dcs_read_1(u8 dcs_cmd, u8 *data)
272 return 0; 274 return 0;
273} 275}
274 276
275static int taal_dcs_write_0(u8 dcs_cmd) 277static int taal_dcs_write_0(struct taal_data *td, u8 dcs_cmd)
276{ 278{
277 return dsi_vc_dcs_write(TCH, &dcs_cmd, 1); 279 return dsi_vc_dcs_write(td->channel, &dcs_cmd, 1);
278} 280}
279 281
280static int taal_dcs_write_1(u8 dcs_cmd, u8 param) 282static int taal_dcs_write_1(struct taal_data *td, u8 dcs_cmd, u8 param)
281{ 283{
282 u8 buf[2]; 284 u8 buf[2];
283 buf[0] = dcs_cmd; 285 buf[0] = dcs_cmd;
284 buf[1] = param; 286 buf[1] = param;
285 return dsi_vc_dcs_write(TCH, buf, 2); 287 return dsi_vc_dcs_write(td->channel, buf, 2);
286} 288}
287 289
288static int taal_sleep_in(struct taal_data *td) 290static int taal_sleep_in(struct taal_data *td)
@@ -294,7 +296,7 @@ static int taal_sleep_in(struct taal_data *td)
294 hw_guard_wait(td); 296 hw_guard_wait(td);
295 297
296 cmd = DCS_SLEEP_IN; 298 cmd = DCS_SLEEP_IN;
297 r = dsi_vc_dcs_write_nosync(TCH, &cmd, 1); 299 r = dsi_vc_dcs_write_nosync(td->channel, &cmd, 1);
298 if (r) 300 if (r)
299 return r; 301 return r;
300 302
@@ -312,7 +314,7 @@ static int taal_sleep_out(struct taal_data *td)
312 314
313 hw_guard_wait(td); 315 hw_guard_wait(td);
314 316
315 r = taal_dcs_write_0(DCS_SLEEP_OUT); 317 r = taal_dcs_write_0(td, DCS_SLEEP_OUT);
316 if (r) 318 if (r)
317 return r; 319 return r;
318 320
@@ -324,30 +326,30 @@ static int taal_sleep_out(struct taal_data *td)
324 return 0; 326 return 0;
325} 327}
326 328
327static int taal_get_id(u8 *id1, u8 *id2, u8 *id3) 329static int taal_get_id(struct taal_data *td, u8 *id1, u8 *id2, u8 *id3)
328{ 330{
329 int r; 331 int r;
330 332
331 r = taal_dcs_read_1(DCS_GET_ID1, id1); 333 r = taal_dcs_read_1(td, DCS_GET_ID1, id1);
332 if (r) 334 if (r)
333 return r; 335 return r;
334 r = taal_dcs_read_1(DCS_GET_ID2, id2); 336 r = taal_dcs_read_1(td, DCS_GET_ID2, id2);
335 if (r) 337 if (r)
336 return r; 338 return r;
337 r = taal_dcs_read_1(DCS_GET_ID3, id3); 339 r = taal_dcs_read_1(td, DCS_GET_ID3, id3);
338 if (r) 340 if (r)
339 return r; 341 return r;
340 342
341 return 0; 343 return 0;
342} 344}
343 345
344static int taal_set_addr_mode(u8 rotate, bool mirror) 346static int taal_set_addr_mode(struct taal_data *td, u8 rotate, bool mirror)
345{ 347{
346 int r; 348 int r;
347 u8 mode; 349 u8 mode;
348 int b5, b6, b7; 350 int b5, b6, b7;
349 351
350 r = taal_dcs_read_1(DCS_READ_MADCTL, &mode); 352 r = taal_dcs_read_1(td, DCS_READ_MADCTL, &mode);
351 if (r) 353 if (r)
352 return r; 354 return r;
353 355
@@ -381,10 +383,11 @@ static int taal_set_addr_mode(u8 rotate, bool mirror)
381 mode &= ~((1<<7) | (1<<6) | (1<<5)); 383 mode &= ~((1<<7) | (1<<6) | (1<<5));
382 mode |= (b7 << 7) | (b6 << 6) | (b5 << 5); 384 mode |= (b7 << 7) | (b6 << 6) | (b5 << 5);
383 385
384 return taal_dcs_write_1(DCS_MEM_ACC_CTRL, mode); 386 return taal_dcs_write_1(td, DCS_MEM_ACC_CTRL, mode);
385} 387}
386 388
387static int taal_set_update_window(u16 x, u16 y, u16 w, u16 h) 389static int taal_set_update_window(struct taal_data *td,
390 u16 x, u16 y, u16 w, u16 h)
388{ 391{
389 int r; 392 int r;
390 u16 x1 = x; 393 u16 x1 = x;
@@ -399,7 +402,7 @@ static int taal_set_update_window(u16 x, u16 y, u16 w, u16 h)
399 buf[3] = (x2 >> 8) & 0xff; 402 buf[3] = (x2 >> 8) & 0xff;
400 buf[4] = (x2 >> 0) & 0xff; 403 buf[4] = (x2 >> 0) & 0xff;
401 404
402 r = dsi_vc_dcs_write_nosync(TCH, buf, sizeof(buf)); 405 r = dsi_vc_dcs_write_nosync(td->channel, buf, sizeof(buf));
403 if (r) 406 if (r)
404 return r; 407 return r;
405 408
@@ -409,11 +412,11 @@ static int taal_set_update_window(u16 x, u16 y, u16 w, u16 h)
409 buf[3] = (y2 >> 8) & 0xff; 412 buf[3] = (y2 >> 8) & 0xff;
410 buf[4] = (y2 >> 0) & 0xff; 413 buf[4] = (y2 >> 0) & 0xff;
411 414
412 r = dsi_vc_dcs_write_nosync(TCH, buf, sizeof(buf)); 415 r = dsi_vc_dcs_write_nosync(td->channel, buf, sizeof(buf));
413 if (r) 416 if (r)
414 return r; 417 return r;
415 418
416 dsi_vc_send_bta_sync(TCH); 419 dsi_vc_send_bta_sync(td->channel);
417 420
418 return r; 421 return r;
419} 422}
@@ -439,7 +442,7 @@ static int taal_bl_update_status(struct backlight_device *dev)
439 if (td->use_dsi_bl) { 442 if (td->use_dsi_bl) {
440 if (td->enabled) { 443 if (td->enabled) {
441 dsi_bus_lock(); 444 dsi_bus_lock();
442 r = taal_dcs_write_1(DCS_BRIGHTNESS, level); 445 r = taal_dcs_write_1(td, DCS_BRIGHTNESS, level);
443 dsi_bus_unlock(); 446 dsi_bus_unlock();
444 } else { 447 } else {
445 r = 0; 448 r = 0;
@@ -502,7 +505,7 @@ static ssize_t taal_num_errors_show(struct device *dev,
502 505
503 if (td->enabled) { 506 if (td->enabled) {
504 dsi_bus_lock(); 507 dsi_bus_lock();
505 r = taal_dcs_read_1(DCS_READ_NUM_ERRORS, &errors); 508 r = taal_dcs_read_1(td, DCS_READ_NUM_ERRORS, &errors);
506 dsi_bus_unlock(); 509 dsi_bus_unlock();
507 } else { 510 } else {
508 r = -ENODEV; 511 r = -ENODEV;
@@ -528,7 +531,7 @@ static ssize_t taal_hw_revision_show(struct device *dev,
528 531
529 if (td->enabled) { 532 if (td->enabled) {
530 dsi_bus_lock(); 533 dsi_bus_lock();
531 r = taal_get_id(&id1, &id2, &id3); 534 r = taal_get_id(td, &id1, &id2, &id3);
532 dsi_bus_unlock(); 535 dsi_bus_unlock();
533 } else { 536 } else {
534 r = -ENODEV; 537 r = -ENODEV;
@@ -590,7 +593,7 @@ static ssize_t store_cabc_mode(struct device *dev,
590 if (td->enabled) { 593 if (td->enabled) {
591 dsi_bus_lock(); 594 dsi_bus_lock();
592 if (!td->cabc_broken) 595 if (!td->cabc_broken)
593 taal_dcs_write_1(DCS_WRITE_CABC, i); 596 taal_dcs_write_1(td, DCS_WRITE_CABC, i);
594 dsi_bus_unlock(); 597 dsi_bus_unlock();
595 } 598 }
596 599
@@ -774,14 +777,29 @@ static int taal_probe(struct omap_dss_device *dssdev)
774 dev_dbg(&dssdev->dev, "Using GPIO TE\n"); 777 dev_dbg(&dssdev->dev, "Using GPIO TE\n");
775 } 778 }
776 779
780 r = omap_dsi_request_vc(dssdev, &td->channel);
781 if (r) {
782 dev_err(&dssdev->dev, "failed to get virtual channel\n");
783 goto err_req_vc;
784 }
785
786 r = omap_dsi_set_vc_id(dssdev, td->channel, TCH);
787 if (r) {
788 dev_err(&dssdev->dev, "failed to set VC_ID\n");
789 goto err_vc_id;
790 }
791
777 r = sysfs_create_group(&dssdev->dev.kobj, &taal_attr_group); 792 r = sysfs_create_group(&dssdev->dev.kobj, &taal_attr_group);
778 if (r) { 793 if (r) {
779 dev_err(&dssdev->dev, "failed to create sysfs files\n"); 794 dev_err(&dssdev->dev, "failed to create sysfs files\n");
780 goto err_sysfs; 795 goto err_vc_id;
781 } 796 }
782 797
783 return 0; 798 return 0;
784err_sysfs: 799
800err_vc_id:
801 omap_dsi_release_vc(dssdev, td->channel);
802err_req_vc:
785 if (panel_data->use_ext_te) 803 if (panel_data->use_ext_te)
786 free_irq(gpio_to_irq(panel_data->ext_te_gpio), dssdev); 804 free_irq(gpio_to_irq(panel_data->ext_te_gpio), dssdev);
787err_irq: 805err_irq:
@@ -808,6 +826,7 @@ static void taal_remove(struct omap_dss_device *dssdev)
808 dev_dbg(&dssdev->dev, "remove\n"); 826 dev_dbg(&dssdev->dev, "remove\n");
809 827
810 sysfs_remove_group(&dssdev->dev.kobj, &taal_attr_group); 828 sysfs_remove_group(&dssdev->dev.kobj, &taal_attr_group);
829 omap_dsi_release_vc(dssdev, td->channel);
811 830
812 if (panel_data->use_ext_te) { 831 if (panel_data->use_ext_te) {
813 int gpio = panel_data->ext_te_gpio; 832 int gpio = panel_data->ext_te_gpio;
@@ -846,13 +865,13 @@ static int taal_power_on(struct omap_dss_device *dssdev)
846 865
847 taal_hw_reset(dssdev); 866 taal_hw_reset(dssdev);
848 867
849 omapdss_dsi_vc_enable_hs(TCH, false); 868 omapdss_dsi_vc_enable_hs(td->channel, false);
850 869
851 r = taal_sleep_out(td); 870 r = taal_sleep_out(td);
852 if (r) 871 if (r)
853 goto err; 872 goto err;
854 873
855 r = taal_get_id(&id1, &id2, &id3); 874 r = taal_get_id(td, &id1, &id2, &id3);
856 if (r) 875 if (r)
857 goto err; 876 goto err;
858 877
@@ -861,30 +880,30 @@ static int taal_power_on(struct omap_dss_device *dssdev)
861 (id2 == 0x00 || id2 == 0xff || id2 == 0x81)) 880 (id2 == 0x00 || id2 == 0xff || id2 == 0x81))
862 td->cabc_broken = true; 881 td->cabc_broken = true;
863 882
864 r = taal_dcs_write_1(DCS_BRIGHTNESS, 0xff); 883 r = taal_dcs_write_1(td, DCS_BRIGHTNESS, 0xff);
865 if (r) 884 if (r)
866 goto err; 885 goto err;
867 886
868 r = taal_dcs_write_1(DCS_CTRL_DISPLAY, 887 r = taal_dcs_write_1(td, DCS_CTRL_DISPLAY,
869 (1<<2) | (1<<5)); /* BL | BCTRL */ 888 (1<<2) | (1<<5)); /* BL | BCTRL */
870 if (r) 889 if (r)
871 goto err; 890 goto err;
872 891
873 r = taal_dcs_write_1(DCS_PIXEL_FORMAT, 0x7); /* 24bit/pixel */ 892 r = taal_dcs_write_1(td, DCS_PIXEL_FORMAT, 0x7); /* 24bit/pixel */
874 if (r) 893 if (r)
875 goto err; 894 goto err;
876 895
877 r = taal_set_addr_mode(td->rotate, td->mirror); 896 r = taal_set_addr_mode(td, td->rotate, td->mirror);
878 if (r) 897 if (r)
879 goto err; 898 goto err;
880 899
881 if (!td->cabc_broken) { 900 if (!td->cabc_broken) {
882 r = taal_dcs_write_1(DCS_WRITE_CABC, td->cabc_mode); 901 r = taal_dcs_write_1(td, DCS_WRITE_CABC, td->cabc_mode);
883 if (r) 902 if (r)
884 goto err; 903 goto err;
885 } 904 }
886 905
887 r = taal_dcs_write_0(DCS_DISPLAY_ON); 906 r = taal_dcs_write_0(td, DCS_DISPLAY_ON);
888 if (r) 907 if (r)
889 goto err; 908 goto err;
890 909
@@ -903,7 +922,7 @@ static int taal_power_on(struct omap_dss_device *dssdev)
903 td->intro_printed = true; 922 td->intro_printed = true;
904 } 923 }
905 924
906 omapdss_dsi_vc_enable_hs(TCH, true); 925 omapdss_dsi_vc_enable_hs(td->channel, true);
907 926
908 return 0; 927 return 0;
909err: 928err:
@@ -921,7 +940,7 @@ static void taal_power_off(struct omap_dss_device *dssdev)
921 struct taal_data *td = dev_get_drvdata(&dssdev->dev); 940 struct taal_data *td = dev_get_drvdata(&dssdev->dev);
922 int r; 941 int r;
923 942
924 r = taal_dcs_write_0(DCS_DISPLAY_OFF); 943 r = taal_dcs_write_0(td, DCS_DISPLAY_OFF);
925 if (!r) { 944 if (!r) {
926 r = taal_sleep_in(td); 945 r = taal_sleep_in(td);
927 /* HACK: wait a bit so that the message goes through */ 946 /* HACK: wait a bit so that the message goes through */
@@ -1089,7 +1108,7 @@ static irqreturn_t taal_te_isr(int irq, void *data)
1089 if (old) { 1108 if (old) {
1090 cancel_delayed_work(&td->te_timeout_work); 1109 cancel_delayed_work(&td->te_timeout_work);
1091 1110
1092 r = omap_dsi_update(dssdev, TCH, 1111 r = omap_dsi_update(dssdev, td->channel,
1093 td->update_region.x, 1112 td->update_region.x,
1094 td->update_region.y, 1113 td->update_region.y,
1095 td->update_region.w, 1114 td->update_region.w,
@@ -1139,7 +1158,7 @@ static int taal_update(struct omap_dss_device *dssdev,
1139 if (r) 1158 if (r)
1140 goto err; 1159 goto err;
1141 1160
1142 r = taal_set_update_window(x, y, w, h); 1161 r = taal_set_update_window(td, x, y, w, h);
1143 if (r) 1162 if (r)
1144 goto err; 1163 goto err;
1145 1164
@@ -1153,7 +1172,7 @@ static int taal_update(struct omap_dss_device *dssdev,
1153 msecs_to_jiffies(250)); 1172 msecs_to_jiffies(250));
1154 atomic_set(&td->do_update, 1); 1173 atomic_set(&td->do_update, 1);
1155 } else { 1174 } else {
1156 r = omap_dsi_update(dssdev, TCH, x, y, w, h, 1175 r = omap_dsi_update(dssdev, td->channel, x, y, w, h,
1157 taal_framedone_cb, dssdev); 1176 taal_framedone_cb, dssdev);
1158 if (r) 1177 if (r)
1159 goto err; 1178 goto err;
@@ -1191,9 +1210,9 @@ static int _taal_enable_te(struct omap_dss_device *dssdev, bool enable)
1191 int r; 1210 int r;
1192 1211
1193 if (enable) 1212 if (enable)
1194 r = taal_dcs_write_1(DCS_TEAR_ON, 0); 1213 r = taal_dcs_write_1(td, DCS_TEAR_ON, 0);
1195 else 1214 else
1196 r = taal_dcs_write_0(DCS_TEAR_OFF); 1215 r = taal_dcs_write_0(td, DCS_TEAR_OFF);
1197 1216
1198 if (!panel_data->use_ext_te) 1217 if (!panel_data->use_ext_te)
1199 omapdss_dsi_enable_te(dssdev, enable); 1218 omapdss_dsi_enable_te(dssdev, enable);
@@ -1263,7 +1282,7 @@ static int taal_rotate(struct omap_dss_device *dssdev, u8 rotate)
1263 dsi_bus_lock(); 1282 dsi_bus_lock();
1264 1283
1265 if (td->enabled) { 1284 if (td->enabled) {
1266 r = taal_set_addr_mode(rotate, td->mirror); 1285 r = taal_set_addr_mode(td, rotate, td->mirror);
1267 if (r) 1286 if (r)
1268 goto err; 1287 goto err;
1269 } 1288 }
@@ -1306,7 +1325,7 @@ static int taal_mirror(struct omap_dss_device *dssdev, bool enable)
1306 1325
1307 dsi_bus_lock(); 1326 dsi_bus_lock();
1308 if (td->enabled) { 1327 if (td->enabled) {
1309 r = taal_set_addr_mode(td->rotate, enable); 1328 r = taal_set_addr_mode(td, td->rotate, enable);
1310 if (r) 1329 if (r)
1311 goto err; 1330 goto err;
1312 } 1331 }
@@ -1350,13 +1369,13 @@ static int taal_run_test(struct omap_dss_device *dssdev, int test_num)
1350 1369
1351 dsi_bus_lock(); 1370 dsi_bus_lock();
1352 1371
1353 r = taal_dcs_read_1(DCS_GET_ID1, &id1); 1372 r = taal_dcs_read_1(td, DCS_GET_ID1, &id1);
1354 if (r) 1373 if (r)
1355 goto err2; 1374 goto err2;
1356 r = taal_dcs_read_1(DCS_GET_ID2, &id2); 1375 r = taal_dcs_read_1(td, DCS_GET_ID2, &id2);
1357 if (r) 1376 if (r)
1358 goto err2; 1377 goto err2;
1359 r = taal_dcs_read_1(DCS_GET_ID3, &id3); 1378 r = taal_dcs_read_1(td, DCS_GET_ID3, &id3);
1360 if (r) 1379 if (r)
1361 goto err2; 1380 goto err2;
1362 1381
@@ -1404,9 +1423,9 @@ static int taal_memory_read(struct omap_dss_device *dssdev,
1404 else 1423 else
1405 plen = 2; 1424 plen = 2;
1406 1425
1407 taal_set_update_window(x, y, w, h); 1426 taal_set_update_window(td, x, y, w, h);
1408 1427
1409 r = dsi_vc_set_max_rx_packet_size(TCH, plen); 1428 r = dsi_vc_set_max_rx_packet_size(td->channel, plen);
1410 if (r) 1429 if (r)
1411 goto err2; 1430 goto err2;
1412 1431
@@ -1414,7 +1433,7 @@ static int taal_memory_read(struct omap_dss_device *dssdev,
1414 u8 dcs_cmd = first ? 0x2e : 0x3e; 1433 u8 dcs_cmd = first ? 0x2e : 0x3e;
1415 first = 0; 1434 first = 0;
1416 1435
1417 r = dsi_vc_dcs_read(TCH, dcs_cmd, 1436 r = dsi_vc_dcs_read(td->channel, dcs_cmd,
1418 buf + buf_used, size - buf_used); 1437 buf + buf_used, size - buf_used);
1419 1438
1420 if (r < 0) { 1439 if (r < 0) {
@@ -1440,7 +1459,7 @@ static int taal_memory_read(struct omap_dss_device *dssdev,
1440 r = buf_used; 1459 r = buf_used;
1441 1460
1442err3: 1461err3:
1443 dsi_vc_set_max_rx_packet_size(TCH, 1); 1462 dsi_vc_set_max_rx_packet_size(td->channel, 1);
1444err2: 1463err2:
1445 dsi_bus_unlock(); 1464 dsi_bus_unlock();
1446err1: 1465err1:
@@ -1466,7 +1485,7 @@ static void taal_esd_work(struct work_struct *work)
1466 1485
1467 dsi_bus_lock(); 1486 dsi_bus_lock();
1468 1487
1469 r = taal_dcs_read_1(DCS_RDDSDR, &state1); 1488 r = taal_dcs_read_1(td, DCS_RDDSDR, &state1);
1470 if (r) { 1489 if (r) {
1471 dev_err(&dssdev->dev, "failed to read Taal status\n"); 1490 dev_err(&dssdev->dev, "failed to read Taal status\n");
1472 goto err; 1491 goto err;
@@ -1479,7 +1498,7 @@ static void taal_esd_work(struct work_struct *work)
1479 goto err; 1498 goto err;
1480 } 1499 }
1481 1500
1482 r = taal_dcs_read_1(DCS_RDDSDR, &state2); 1501 r = taal_dcs_read_1(td, DCS_RDDSDR, &state2);
1483 if (r) { 1502 if (r) {
1484 dev_err(&dssdev->dev, "failed to read Taal status\n"); 1503 dev_err(&dssdev->dev, "failed to read Taal status\n");
1485 goto err; 1504 goto err;
@@ -1495,7 +1514,7 @@ static void taal_esd_work(struct work_struct *work)
1495 /* Self-diagnostics result is also shown on TE GPIO line. We need 1514 /* Self-diagnostics result is also shown on TE GPIO line. We need
1496 * to re-enable TE after self diagnostics */ 1515 * to re-enable TE after self diagnostics */
1497 if (td->te_enabled && panel_data->use_ext_te) { 1516 if (td->te_enabled && panel_data->use_ext_te) {
1498 r = taal_dcs_write_1(DCS_TEAR_ON, 0); 1517 r = taal_dcs_write_1(td, DCS_TEAR_ON, 0);
1499 if (r) 1518 if (r)
1500 goto err; 1519 goto err;
1501 } 1520 }