From 99a375519eeaac617a0d5859d5a987049d548f59 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 3 Dec 2019 16:26:55 +0100 Subject: drm/panel: rpi: Drop unused GPIO includes The Rpi panel driver doesn't use any symbols from these GPIO includes so just drop them. Cc: Eric Anholt Signed-off-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191203152655.159281-1-linus.walleij@linaro.org --- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c') diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 09824e92fc78..adf2dace96e3 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -44,8 +44,6 @@ #include #include #include -#include -#include #include #include #include -- cgit From 0ce8ddd8e06dcbcd8d31607921c31ad1c32ad56c Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sat, 7 Dec 2019 15:03:33 +0100 Subject: drm/panel: add drm_connector argument to get_modes() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Today the bridge creates the drm_connector, but that is planned to be moved to the display drivers. To facilitate this, update drm_panel_funcs.get_modes() to take drm_connector as an argument. All panel drivers implementing get_modes() are updated. v2: - drop accidental change (Laurent) - update docs for get_modes (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Linus Walleij Cc: Thierry Reding Cc: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Linus Walleij Cc: Jagan Teki Cc: Stefan Mavrodiev Cc: Robert Chiras Cc: "Guido Günther" Cc: Purism Kernel Team Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-6-sam@ravnborg.org --- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c') diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index adf2dace96e3..0b8cc199c8d2 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -309,9 +309,9 @@ static int rpi_touchscreen_enable(struct drm_panel *panel) return 0; } -static int rpi_touchscreen_get_modes(struct drm_panel *panel) +static int rpi_touchscreen_get_modes(struct drm_panel *panel, + struct drm_connector *connector) { - struct drm_connector *connector = panel->connector; struct drm_device *drm = panel->drm; unsigned int i, num = 0; static const u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24; -- cgit From aa6c43644bc57b3d297247746184d1d82ed9de82 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sat, 7 Dec 2019 15:03:35 +0100 Subject: drm/panel: drop drm_device from drm_panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The panel drivers used drm_panel.drm for two purposes: 1) Argument to drm_mode_duplicate() 2) drm->dev was used in error messages The first usage is replaced with drm_connector.dev - drm_connector is already connected to a drm_device and we have a valid connector The second usage is replaced with drm_panel.dev - this makes drivers more consistent in their dev argument used for dev_err() and friends With these replacements there are no more uses of drm_panel.drm, so it is removed from struct drm_panel. With this change drm_panel_attach() and drm_panel_detach() no longer have any use as they are empty functions. v2: - editorial correction in changelog (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Linus Walleij Cc: Thierry Reding Cc: Laurent Pinchart Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Linus Walleij Cc: Jagan Teki Cc: Stefan Mavrodiev Cc: Robert Chiras Cc: "Guido Günther" Cc: Purism Kernel Team Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-8-sam@ravnborg.org --- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c') diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 0b8cc199c8d2..8f078b7dd89e 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -312,7 +312,6 @@ static int rpi_touchscreen_enable(struct drm_panel *panel) static int rpi_touchscreen_get_modes(struct drm_panel *panel, struct drm_connector *connector) { - struct drm_device *drm = panel->drm; unsigned int i, num = 0; static const u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24; @@ -320,9 +319,9 @@ static int rpi_touchscreen_get_modes(struct drm_panel *panel, const struct drm_display_mode *m = &rpi_touchscreen_modes[i]; struct drm_display_mode *mode; - mode = drm_mode_duplicate(drm, m); + mode = drm_mode_duplicate(connector->dev, m); if (!mode) { - dev_err(drm->dev, "failed to add mode %ux%u@%u\n", + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", m->hdisplay, m->vdisplay, m->vrefresh); continue; } -- cgit