diff options
-rw-r--r-- | drivers/gpu/drm/arm/malidp_hw.c | 24 | ||||
-rw-r--r-- | drivers/gpu/drm/arm/malidp_hw.h | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/arm/malidp_planes.c | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index 4bdf531f7844..9ec6d6904f5e 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "malidp_drv.h" | 21 | #include "malidp_drv.h" |
22 | #include "malidp_hw.h" | 22 | #include "malidp_hw.h" |
23 | 23 | ||
24 | static const struct malidp_input_format malidp500_de_formats[] = { | 24 | static const struct malidp_format_id malidp500_de_formats[] = { |
25 | /* fourcc, layers supporting the format, internal id */ | 25 | /* fourcc, layers supporting the format, internal id */ |
26 | { DRM_FORMAT_ARGB2101010, DE_VIDEO1 | DE_GRAPHICS1 | DE_GRAPHICS2, 0 }, | 26 | { DRM_FORMAT_ARGB2101010, DE_VIDEO1 | DE_GRAPHICS1 | DE_GRAPHICS2, 0 }, |
27 | { DRM_FORMAT_ABGR2101010, DE_VIDEO1 | DE_GRAPHICS1 | DE_GRAPHICS2, 1 }, | 27 | { DRM_FORMAT_ABGR2101010, DE_VIDEO1 | DE_GRAPHICS1 | DE_GRAPHICS2, 1 }, |
@@ -69,7 +69,7 @@ static const struct malidp_input_format malidp500_de_formats[] = { | |||
69 | { DRM_FORMAT_NV12, DE_VIDEO1 | DE_VIDEO2, MALIDP_ID(5, 6) }, \ | 69 | { DRM_FORMAT_NV12, DE_VIDEO1 | DE_VIDEO2, MALIDP_ID(5, 6) }, \ |
70 | { DRM_FORMAT_YUV420, DE_VIDEO1 | DE_VIDEO2, MALIDP_ID(5, 7) } | 70 | { DRM_FORMAT_YUV420, DE_VIDEO1 | DE_VIDEO2, MALIDP_ID(5, 7) } |
71 | 71 | ||
72 | static const struct malidp_input_format malidp550_de_formats[] = { | 72 | static const struct malidp_format_id malidp550_de_formats[] = { |
73 | MALIDP_COMMON_FORMATS, | 73 | MALIDP_COMMON_FORMATS, |
74 | }; | 74 | }; |
75 | 75 | ||
@@ -436,8 +436,8 @@ const struct malidp_hw_device malidp_device[MALIDP_MAX_DEVICES] = { | |||
436 | .irq_mask = MALIDP500_DE_IRQ_CONF_VALID, | 436 | .irq_mask = MALIDP500_DE_IRQ_CONF_VALID, |
437 | .vsync_irq = MALIDP500_DE_IRQ_CONF_VALID, | 437 | .vsync_irq = MALIDP500_DE_IRQ_CONF_VALID, |
438 | }, | 438 | }, |
439 | .input_formats = malidp500_de_formats, | 439 | .pixel_formats = malidp500_de_formats, |
440 | .n_input_formats = ARRAY_SIZE(malidp500_de_formats), | 440 | .n_pixel_formats = ARRAY_SIZE(malidp500_de_formats), |
441 | .bus_align_bytes = 8, | 441 | .bus_align_bytes = 8, |
442 | }, | 442 | }, |
443 | .query_hw = malidp500_query_hw, | 443 | .query_hw = malidp500_query_hw, |
@@ -469,8 +469,8 @@ const struct malidp_hw_device malidp_device[MALIDP_MAX_DEVICES] = { | |||
469 | .irq_mask = MALIDP550_DC_IRQ_CONF_VALID, | 469 | .irq_mask = MALIDP550_DC_IRQ_CONF_VALID, |
470 | .vsync_irq = MALIDP550_DC_IRQ_CONF_VALID, | 470 | .vsync_irq = MALIDP550_DC_IRQ_CONF_VALID, |
471 | }, | 471 | }, |
472 | .input_formats = malidp550_de_formats, | 472 | .pixel_formats = malidp550_de_formats, |
473 | .n_input_formats = ARRAY_SIZE(malidp550_de_formats), | 473 | .n_pixel_formats = ARRAY_SIZE(malidp550_de_formats), |
474 | .bus_align_bytes = 8, | 474 | .bus_align_bytes = 8, |
475 | }, | 475 | }, |
476 | .query_hw = malidp550_query_hw, | 476 | .query_hw = malidp550_query_hw, |
@@ -503,8 +503,8 @@ const struct malidp_hw_device malidp_device[MALIDP_MAX_DEVICES] = { | |||
503 | .irq_mask = MALIDP550_DC_IRQ_CONF_VALID, | 503 | .irq_mask = MALIDP550_DC_IRQ_CONF_VALID, |
504 | .vsync_irq = MALIDP550_DC_IRQ_CONF_VALID, | 504 | .vsync_irq = MALIDP550_DC_IRQ_CONF_VALID, |
505 | }, | 505 | }, |
506 | .input_formats = malidp550_de_formats, | 506 | .pixel_formats = malidp550_de_formats, |
507 | .n_input_formats = ARRAY_SIZE(malidp550_de_formats), | 507 | .n_pixel_formats = ARRAY_SIZE(malidp550_de_formats), |
508 | .bus_align_bytes = 16, | 508 | .bus_align_bytes = 16, |
509 | }, | 509 | }, |
510 | .query_hw = malidp650_query_hw, | 510 | .query_hw = malidp650_query_hw, |
@@ -522,10 +522,10 @@ u8 malidp_hw_get_format_id(const struct malidp_hw_regmap *map, | |||
522 | { | 522 | { |
523 | unsigned int i; | 523 | unsigned int i; |
524 | 524 | ||
525 | for (i = 0; i < map->n_input_formats; i++) { | 525 | for (i = 0; i < map->n_pixel_formats; i++) { |
526 | if (((map->input_formats[i].layer & layer_id) == layer_id) && | 526 | if (((map->pixel_formats[i].layer & layer_id) == layer_id) && |
527 | (map->input_formats[i].format == format)) | 527 | (map->pixel_formats[i].format == format)) |
528 | return map->input_formats[i].id; | 528 | return map->pixel_formats[i].id; |
529 | } | 529 | } |
530 | 530 | ||
531 | return MALIDP_INVALID_FORMAT_ID; | 531 | return MALIDP_INVALID_FORMAT_ID; |
diff --git a/drivers/gpu/drm/arm/malidp_hw.h b/drivers/gpu/drm/arm/malidp_hw.h index 087e1202db3d..4f8c884d1960 100644 --- a/drivers/gpu/drm/arm/malidp_hw.h +++ b/drivers/gpu/drm/arm/malidp_hw.h | |||
@@ -35,7 +35,7 @@ enum { | |||
35 | DE_SMART = BIT(4), | 35 | DE_SMART = BIT(4), |
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct malidp_input_format { | 38 | struct malidp_format_id { |
39 | u32 format; /* DRM fourcc */ | 39 | u32 format; /* DRM fourcc */ |
40 | u8 layer; /* bitmask of layers supporting it */ | 40 | u8 layer; /* bitmask of layers supporting it */ |
41 | u8 id; /* used internally */ | 41 | u8 id; /* used internally */ |
@@ -85,9 +85,9 @@ struct malidp_hw_regmap { | |||
85 | const struct malidp_irq_map se_irq_map; | 85 | const struct malidp_irq_map se_irq_map; |
86 | const struct malidp_irq_map dc_irq_map; | 86 | const struct malidp_irq_map dc_irq_map; |
87 | 87 | ||
88 | /* list of supported input formats for each layer */ | 88 | /* list of supported pixel formats for each layer */ |
89 | const struct malidp_input_format *input_formats; | 89 | const struct malidp_format_id *pixel_formats; |
90 | const u8 n_input_formats; | 90 | const u8 n_pixel_formats; |
91 | 91 | ||
92 | /* pitch alignment requirement in bytes */ | 92 | /* pitch alignment requirement in bytes */ |
93 | const u8 bus_align_bytes; | 93 | const u8 bus_align_bytes; |
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 1db8b6977efc..8845647d5bef 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c | |||
@@ -267,7 +267,7 @@ int malidp_de_planes_init(struct drm_device *drm) | |||
267 | u32 *formats; | 267 | u32 *formats; |
268 | int ret, i, j, n; | 268 | int ret, i, j, n; |
269 | 269 | ||
270 | formats = kcalloc(map->n_input_formats, sizeof(*formats), GFP_KERNEL); | 270 | formats = kcalloc(map->n_pixel_formats, sizeof(*formats), GFP_KERNEL); |
271 | if (!formats) { | 271 | if (!formats) { |
272 | ret = -ENOMEM; | 272 | ret = -ENOMEM; |
273 | goto cleanup; | 273 | goto cleanup; |
@@ -283,9 +283,9 @@ int malidp_de_planes_init(struct drm_device *drm) | |||
283 | } | 283 | } |
284 | 284 | ||
285 | /* build the list of DRM supported formats based on the map */ | 285 | /* build the list of DRM supported formats based on the map */ |
286 | for (n = 0, j = 0; j < map->n_input_formats; j++) { | 286 | for (n = 0, j = 0; j < map->n_pixel_formats; j++) { |
287 | if ((map->input_formats[j].layer & id) == id) | 287 | if ((map->pixel_formats[j].layer & id) == id) |
288 | formats[n++] = map->input_formats[j].format; | 288 | formats[n++] = map->pixel_formats[j].format; |
289 | } | 289 | } |
290 | 290 | ||
291 | plane_type = (i == 0) ? DRM_PLANE_TYPE_PRIMARY : | 291 | plane_type = (i == 0) ? DRM_PLANE_TYPE_PRIMARY : |