Commit 0208d511 authored by Stéphane Marchesin's avatar Stéphane Marchesin Committed by Thierry Reding

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: default avatarStéphane Marchesin <marcheu@chromium.org>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent ea44739d
...@@ -37,6 +37,8 @@ struct panel_desc { ...@@ -37,6 +37,8 @@ struct panel_desc {
const struct drm_display_mode *modes; const struct drm_display_mode *modes;
unsigned int num_modes; unsigned int num_modes;
unsigned int bpc;
struct { struct {
unsigned int width; unsigned int width;
unsigned int height; unsigned int height;
...@@ -87,6 +89,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) ...@@ -87,6 +89,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
num++; num++;
} }
connector->display_info.bpc = panel->desc->bpc;
connector->display_info.width_mm = panel->desc->size.width; connector->display_info.width_mm = panel->desc->size.width;
connector->display_info.height_mm = panel->desc->size.height; connector->display_info.height_mm = panel->desc->size.height;
...@@ -285,6 +288,7 @@ static const struct drm_display_mode auo_b101aw03_mode = { ...@@ -285,6 +288,7 @@ static const struct drm_display_mode auo_b101aw03_mode = {
static const struct panel_desc auo_b101aw03 = { static const struct panel_desc auo_b101aw03 = {
.modes = &auo_b101aw03_mode, .modes = &auo_b101aw03_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 6,
.size = { .size = {
.width = 223, .width = 223,
.height = 125, .height = 125,
...@@ -307,6 +311,7 @@ static const struct drm_display_mode auo_b133xtn01_mode = { ...@@ -307,6 +311,7 @@ static const struct drm_display_mode auo_b133xtn01_mode = {
static const struct panel_desc auo_b133xtn01 = { static const struct panel_desc auo_b133xtn01 = {
.modes = &auo_b133xtn01_mode, .modes = &auo_b133xtn01_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 6,
.size = { .size = {
.width = 293, .width = 293,
.height = 165, .height = 165,
...@@ -329,6 +334,7 @@ static const struct drm_display_mode chunghwa_claa101wa01a_mode = { ...@@ -329,6 +334,7 @@ static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
static const struct panel_desc chunghwa_claa101wa01a = { static const struct panel_desc chunghwa_claa101wa01a = {
.modes = &chunghwa_claa101wa01a_mode, .modes = &chunghwa_claa101wa01a_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 6,
.size = { .size = {
.width = 220, .width = 220,
.height = 120, .height = 120,
...@@ -351,6 +357,7 @@ static const struct drm_display_mode chunghwa_claa101wb01_mode = { ...@@ -351,6 +357,7 @@ static const struct drm_display_mode chunghwa_claa101wb01_mode = {
static const struct panel_desc chunghwa_claa101wb01 = { static const struct panel_desc chunghwa_claa101wb01 = {
.modes = &chunghwa_claa101wb01_mode, .modes = &chunghwa_claa101wb01_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 6,
.size = { .size = {
.width = 223, .width = 223,
.height = 125, .height = 125,
...@@ -374,6 +381,7 @@ static const struct drm_display_mode edt_et057090dhu_mode = { ...@@ -374,6 +381,7 @@ static const struct drm_display_mode edt_et057090dhu_mode = {
static const struct panel_desc edt_et057090dhu = { static const struct panel_desc edt_et057090dhu = {
.modes = &edt_et057090dhu_mode, .modes = &edt_et057090dhu_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 6,
.size = { .size = {
.width = 115, .width = 115,
.height = 86, .height = 86,
...@@ -397,6 +405,7 @@ static const struct drm_display_mode edt_etm0700g0dh6_mode = { ...@@ -397,6 +405,7 @@ static const struct drm_display_mode edt_etm0700g0dh6_mode = {
static const struct panel_desc edt_etm0700g0dh6 = { static const struct panel_desc edt_etm0700g0dh6 = {
.modes = &edt_etm0700g0dh6_mode, .modes = &edt_etm0700g0dh6_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 6,
.size = { .size = {
.width = 152, .width = 152,
.height = 91, .height = 91,
...@@ -441,6 +450,7 @@ static const struct drm_display_mode innolux_n156bge_l21_mode = { ...@@ -441,6 +450,7 @@ static const struct drm_display_mode innolux_n156bge_l21_mode = {
static const struct panel_desc innolux_n156bge_l21 = { static const struct panel_desc innolux_n156bge_l21 = {
.modes = &innolux_n156bge_l21_mode, .modes = &innolux_n156bge_l21_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 6,
.size = { .size = {
.width = 344, .width = 344,
.height = 193, .height = 193,
...@@ -463,6 +473,7 @@ static const struct drm_display_mode lg_lp129qe_mode = { ...@@ -463,6 +473,7 @@ static const struct drm_display_mode lg_lp129qe_mode = {
static const struct panel_desc lg_lp129qe = { static const struct panel_desc lg_lp129qe = {
.modes = &lg_lp129qe_mode, .modes = &lg_lp129qe_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 8,
.size = { .size = {
.width = 272, .width = 272,
.height = 181, .height = 181,
...@@ -485,6 +496,7 @@ static const struct drm_display_mode samsung_ltn101nt05_mode = { ...@@ -485,6 +496,7 @@ static const struct drm_display_mode samsung_ltn101nt05_mode = {
static const struct panel_desc samsung_ltn101nt05 = { static const struct panel_desc samsung_ltn101nt05 = {
.modes = &samsung_ltn101nt05_mode, .modes = &samsung_ltn101nt05_mode,
.num_modes = 1, .num_modes = 1,
.bpc = 6,
.size = { .size = {
.width = 1024, .width = 1024,
.height = 600, .height = 600,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment