aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Marchesin <marcheu@chromium.org>2014-06-19 21:18:28 -0400
committerThierry Reding <treding@nvidia.com>2014-08-01 06:41:14 -0400
commit0208d51112b65e27490bc21ab6872358903f7d61 (patch)
tree3609703017b52948a7a9a0a2a8d4cf3cf584aac6
parentea44739db37f7e187a2e684c1f9d5662b9dba94a (diff)
drm/panel: simple: Add bits-per-color support
The bits-per-color is provided by the EDID normally, but if we're using panels, we need to store it somewhere. So we add a field to the panel descriptor for it. Signed-off-by: Stéphane Marchesin <marcheu@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 357712c4446f..fa2aea0981a1 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -37,6 +37,8 @@ struct panel_desc {
37 const struct drm_display_mode *modes; 37 const struct drm_display_mode *modes;
38 unsigned int num_modes; 38 unsigned int num_modes;
39 39
40 unsigned int bpc;
41
40 struct { 42 struct {
41 unsigned int width; 43 unsigned int width;
42 unsigned int height; 44 unsigned int height;
@@ -87,6 +89,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
87 num++; 89 num++;
88 } 90 }
89 91
92 connector->display_info.bpc = panel->desc->bpc;
90 connector->display_info.width_mm = panel->desc->size.width; 93 connector->display_info.width_mm = panel->desc->size.width;
91 connector->display_info.height_mm = panel->desc->size.height; 94 connector->display_info.height_mm = panel->desc->size.height;
92 95
@@ -285,6 +288,7 @@ static const struct drm_display_mode auo_b101aw03_mode = {
285static const struct panel_desc auo_b101aw03 = { 288static const struct panel_desc auo_b101aw03 = {
286 .modes = &auo_b101aw03_mode, 289 .modes = &auo_b101aw03_mode,
287 .num_modes = 1, 290 .num_modes = 1,
291 .bpc = 6,
288 .size = { 292 .size = {
289 .width = 223, 293 .width = 223,
290 .height = 125, 294 .height = 125,
@@ -307,6 +311,7 @@ static const struct drm_display_mode auo_b133xtn01_mode = {
307static const struct panel_desc auo_b133xtn01 = { 311static const struct panel_desc auo_b133xtn01 = {
308 .modes = &auo_b133xtn01_mode, 312 .modes = &auo_b133xtn01_mode,
309 .num_modes = 1, 313 .num_modes = 1,
314 .bpc = 6,
310 .size = { 315 .size = {
311 .width = 293, 316 .width = 293,
312 .height = 165, 317 .height = 165,
@@ -329,6 +334,7 @@ static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
329static const struct panel_desc chunghwa_claa101wa01a = { 334static const struct panel_desc chunghwa_claa101wa01a = {
330 .modes = &chunghwa_claa101wa01a_mode, 335 .modes = &chunghwa_claa101wa01a_mode,
331 .num_modes = 1, 336 .num_modes = 1,
337 .bpc = 6,
332 .size = { 338 .size = {
333 .width = 220, 339 .width = 220,
334 .height = 120, 340 .height = 120,
@@ -351,6 +357,7 @@ static const struct drm_display_mode chunghwa_claa101wb01_mode = {
351static const struct panel_desc chunghwa_claa101wb01 = { 357static const struct panel_desc chunghwa_claa101wb01 = {
352 .modes = &chunghwa_claa101wb01_mode, 358 .modes = &chunghwa_claa101wb01_mode,
353 .num_modes = 1, 359 .num_modes = 1,
360 .bpc = 6,
354 .size = { 361 .size = {
355 .width = 223, 362 .width = 223,
356 .height = 125, 363 .height = 125,
@@ -374,6 +381,7 @@ static const struct drm_display_mode edt_et057090dhu_mode = {
374static const struct panel_desc edt_et057090dhu = { 381static const struct panel_desc edt_et057090dhu = {
375 .modes = &edt_et057090dhu_mode, 382 .modes = &edt_et057090dhu_mode,
376 .num_modes = 1, 383 .num_modes = 1,
384 .bpc = 6,
377 .size = { 385 .size = {
378 .width = 115, 386 .width = 115,
379 .height = 86, 387 .height = 86,
@@ -397,6 +405,7 @@ static const struct drm_display_mode edt_etm0700g0dh6_mode = {
397static const struct panel_desc edt_etm0700g0dh6 = { 405static const struct panel_desc edt_etm0700g0dh6 = {
398 .modes = &edt_etm0700g0dh6_mode, 406 .modes = &edt_etm0700g0dh6_mode,
399 .num_modes = 1, 407 .num_modes = 1,
408 .bpc = 6,
400 .size = { 409 .size = {
401 .width = 152, 410 .width = 152,
402 .height = 91, 411 .height = 91,
@@ -441,6 +450,7 @@ static const struct drm_display_mode innolux_n156bge_l21_mode = {
441static const struct panel_desc innolux_n156bge_l21 = { 450static const struct panel_desc innolux_n156bge_l21 = {
442 .modes = &innolux_n156bge_l21_mode, 451 .modes = &innolux_n156bge_l21_mode,
443 .num_modes = 1, 452 .num_modes = 1,
453 .bpc = 6,
444 .size = { 454 .size = {
445 .width = 344, 455 .width = 344,
446 .height = 193, 456 .height = 193,
@@ -463,6 +473,7 @@ static const struct drm_display_mode lg_lp129qe_mode = {
463static const struct panel_desc lg_lp129qe = { 473static const struct panel_desc lg_lp129qe = {
464 .modes = &lg_lp129qe_mode, 474 .modes = &lg_lp129qe_mode,
465 .num_modes = 1, 475 .num_modes = 1,
476 .bpc = 8,
466 .size = { 477 .size = {
467 .width = 272, 478 .width = 272,
468 .height = 181, 479 .height = 181,
@@ -485,6 +496,7 @@ static const struct drm_display_mode samsung_ltn101nt05_mode = {
485static const struct panel_desc samsung_ltn101nt05 = { 496static const struct panel_desc samsung_ltn101nt05 = {
486 .modes = &samsung_ltn101nt05_mode, 497 .modes = &samsung_ltn101nt05_mode,
487 .num_modes = 1, 498 .num_modes = 1,
499 .bpc = 6,
488 .size = { 500 .size = {
489 .width = 1024, 501 .width = 1024,
490 .height = 600, 502 .height = 600,