Skip to content

Commit

Permalink
drm/panel: mantix: Add media bus format
Browse files Browse the repository at this point in the history
This allows the DSI bridge to detect the correct bus format.
We currently only support MEDIA_BUS_FMT_RGB888_1X24.

Signed-off-by: Guido Günther <[email protected]>
Reviewed-by: Sam Ravnborg <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/75fbe7139a84fa133499afe242c204ba4516da98.1633959458.git.agx@sigxcpu.org
  • Loading branch information
agx committed Oct 12, 2021
1 parent 2f1495f commit 1311f3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/backlight.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/media-bus-format.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/regulator/consumer.h>
Expand Down Expand Up @@ -220,6 +221,10 @@ static const struct drm_display_mode default_mode_ys = {
.height_mm = 130,
};

static const u32 mantix_bus_formats[] = {
MEDIA_BUS_FMT_RGB888_1X24,
};

static int mantix_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
Expand All @@ -241,6 +246,10 @@ static int mantix_get_modes(struct drm_panel *panel,
connector->display_info.height_mm = mode->height_mm;
drm_mode_probed_add(connector, mode);

drm_display_info_set_bus_formats(&connector->display_info,
mantix_bus_formats,
ARRAY_SIZE(mantix_bus_formats));

return 1;
}

Expand Down

0 comments on commit 1311f3d

Please sign in to comment.