The drm/panel drivers uses a mixture of DRM_ and dev_ based logging. With this patchset all panel drivers are migrated to use dev_ based logging as the DRM_ based logging did not add any extra info.
Drop the now unused include of drm_print.h.
With this change new panel drivers will be requires to change to dev_ based logging - so some of the in-flight panel drivers will need trivial updates before they are accepted.
Patch divided in smaller bites to ease review. There is no dependencies between the patches.
Copied a few people that may have input to the move away from DRM_ based logging (Daniel (presumeably on vacation), Jani).
Sam
Sam Ravnborg (5): drm/panel: samsung: Use dev_ based logging drm/panel: leadtek: Use dev_ based logging drm/panel: raydium: Use dev_ based logging drm/panel: sitronix: Use dev_ based logging drm/panel: Use dev_ based logging
drivers/gpu/drm/panel/panel-boe-himax8279d.c | 44 ++++-------- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 51 +++++--------- drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c | 19 +++-- .../gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 21 +++--- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 3 +- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 31 +++------ drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 33 ++++----- drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 58 ++++++---------- drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c | 49 +++++-------- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 40 ++++------- drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 13 ++-- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 33 ++++----- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 18 +++-- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 16 ++--- drivers/gpu/drm/panel/panel-samsung-ld9040.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 23 +++--- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 22 +++--- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 3 +- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 10 ++- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 61 ++++++---------- drivers/gpu/drm/panel/panel-sony-acx424akp.c | 81 ++++++++-------------- drivers/gpu/drm/panel/panel-tpo-tpg110.c | 38 +++++----- drivers/gpu/drm/panel/panel-truly-nt35597.c | 63 ++++++----------- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 41 ++++------- drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c | 51 +++++--------- 27 files changed, 308 insertions(+), 523 deletions(-)
Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org Cc: Guido Günther agx@sigxcpu.org Cc: Linus Walleij linus.walleij@linaro.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com --- drivers/gpu/drm/panel/panel-samsung-ld9040.c | 3 +-- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 23 +++++++------------ drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 3 +-- .../gpu/drm/panel/panel-samsung-s6e63j0x03.c | 3 +-- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 22 ++++++++---------- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 3 +-- 6 files changed, 21 insertions(+), 36 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-samsung-ld9040.c b/drivers/gpu/drm/panel/panel-samsung-ld9040.c index 358168ed8355..f484147fc3a6 100644 --- a/drivers/gpu/drm/panel/panel-samsung-ld9040.c +++ b/drivers/gpu/drm/panel/panel-samsung-ld9040.c @@ -21,7 +21,6 @@
#include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
/* Manufacturer Command Set */ #define MCS_MANPWR 0xb0 @@ -269,7 +268,7 @@ static int ld9040_get_modes(struct drm_panel *panel,
mode = drm_mode_create(connector->dev); if (!mode) { - DRM_ERROR("failed to create a new display mode\n"); + dev_err(panel->dev, "failed to create a new display mode\n"); return 0; }
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c index e88af6f8bf60..4aac0d1573dd 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c @@ -7,7 +7,6 @@ #include <drm/drm_modes.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#include <linux/gpio/consumer.h> #include <linux/regulator/consumer.h> @@ -55,8 +54,7 @@ static int s6d16d0_unprepare(struct drm_panel *panel) /* Enter sleep mode */ ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret) { - DRM_DEV_ERROR(s6->dev, "failed to enter sleep mode (%d)\n", - ret); + dev_err(s6->dev, "failed to enter sleep mode (%d)\n", ret); return ret; }
@@ -75,7 +73,7 @@ static int s6d16d0_prepare(struct drm_panel *panel)
ret = regulator_enable(s6->supply); if (ret) { - DRM_DEV_ERROR(s6->dev, "failed to enable supply (%d)\n", ret); + dev_err(s6->dev, "failed to enable supply (%d)\n", ret); return ret; }
@@ -90,15 +88,13 @@ static int s6d16d0_prepare(struct drm_panel *panel) ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK); if (ret) { - DRM_DEV_ERROR(s6->dev, "failed to enable vblank TE (%d)\n", - ret); + dev_err(s6->dev, "failed to enable vblank TE (%d)\n", ret); return ret; } /* Exit sleep mode and power on */ ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret) { - DRM_DEV_ERROR(s6->dev, "failed to exit sleep mode (%d)\n", - ret); + dev_err(s6->dev, "failed to exit sleep mode (%d)\n", ret); return ret; }
@@ -113,8 +109,7 @@ static int s6d16d0_enable(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_on(dsi); if (ret) { - DRM_DEV_ERROR(s6->dev, "failed to turn display on (%d)\n", - ret); + dev_err(s6->dev, "failed to turn display on (%d)\n", ret); return ret; }
@@ -129,8 +124,7 @@ static int s6d16d0_disable(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret) { - DRM_DEV_ERROR(s6->dev, "failed to turn display off (%d)\n", - ret); + dev_err(s6->dev, "failed to turn display off (%d)\n", ret); return ret; }
@@ -144,7 +138,7 @@ static int s6d16d0_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &samsung_s6d16d0_mode); if (!mode) { - DRM_ERROR("bad mode or failed to add mode\n"); + dev_err(panel->dev, "bad mode or failed to add mode\n"); return -EINVAL; } drm_mode_set_name(mode); @@ -204,8 +198,7 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi) if (IS_ERR(s6->reset_gpio)) { ret = PTR_ERR(s6->reset_gpio); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, "failed to request GPIO (%d)\n", - ret); + dev_err(dev, "failed to request GPIO (%d)\n", ret); return ret; }
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c index 2c84036c6a65..1d1c79a18613 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c @@ -18,7 +18,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define S6E3HA2_MIN_BRIGHTNESS 0 #define S6E3HA2_MAX_BRIGHTNESS 100 @@ -651,7 +650,7 @@ static int s6e3ha2_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, ctx->desc->mode); if (!mode) { - DRM_ERROR("failed to add mode %ux%ux@%u\n", + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay, drm_mode_vrefresh(ctx->desc->mode)); return -ENOMEM; diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c index 7a43eb3545cf..b962c817fb30 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c @@ -19,7 +19,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define MCS_LEVEL2_KEY 0xf0 #define MCS_MTP_KEY 0xf1 @@ -406,7 +405,7 @@ static int s6e63j0x03_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_ERROR("failed to add mode %ux%ux@%u\n", + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", default_mode.hdisplay, default_mode.vdisplay, drm_mode_vrefresh(&default_mode)); return -ENOMEM; diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c index e086efea2950..2cc772fdc456 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c @@ -10,7 +10,6 @@
#include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#include <linux/backlight.h> #include <linux/delay.h> @@ -157,7 +156,7 @@ static void s6e63m0_dcs_write(struct s6e63m0 *ctx, const u8 *data, size_t len) if (ctx->error < 0 || len == 0) return;
- DRM_DEV_DEBUG(ctx->dev, "writing dcs seq: %*ph\n", (int)len, data); + dev_dbg(ctx->dev, "writing dcs seq: %*ph\n", (int)len, data); ret = s6e63m0_spi_write_word(ctx, *data);
while (!ret && --len) { @@ -166,8 +165,7 @@ static void s6e63m0_dcs_write(struct s6e63m0 *ctx, const u8 *data, size_t len) }
if (ret) { - DRM_DEV_ERROR(ctx->dev, "error %d writing dcs seq: %*ph\n", ret, - (int)len, data); + dev_err(ctx->dev, "error %d writing dcs seq: %*ph\n", ret, (int)len, data); ctx->error = ret; }
@@ -368,9 +366,9 @@ static int s6e63m0_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_ERROR("failed to add mode %ux%ux@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", + default_mode.hdisplay, default_mode.vdisplay, + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
@@ -425,8 +423,7 @@ static int s6e63m0_backlight_register(struct s6e63m0 *ctx) &props); if (IS_ERR(ctx->bl_dev)) { ret = PTR_ERR(ctx->bl_dev); - DRM_DEV_ERROR(dev, "error registering backlight device (%d)\n", - ret); + dev_err(dev, "error registering backlight device (%d)\n", ret); }
return ret; @@ -453,14 +450,13 @@ static int s6e63m0_probe(struct spi_device *spi) ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ctx->supplies); if (ret < 0) { - DRM_DEV_ERROR(dev, "failed to get regulators: %d\n", ret); + dev_err(dev, "failed to get regulators: %d\n", ret); return ret; }
ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(ctx->reset_gpio)) { - DRM_DEV_ERROR(dev, "cannot get reset-gpios %ld\n", - PTR_ERR(ctx->reset_gpio)); + dev_err(dev, "cannot get reset-gpios %ld\n", PTR_ERR(ctx->reset_gpio)); return PTR_ERR(ctx->reset_gpio); }
@@ -468,7 +464,7 @@ static int s6e63m0_probe(struct spi_device *spi) spi->mode = SPI_MODE_3; ret = spi_setup(spi); if (ret < 0) { - DRM_DEV_ERROR(dev, "spi setup failed.\n"); + dev_err(dev, "spi setup failed.\n"); return ret; }
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c index e36cb1a25318..527371120266 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c @@ -25,7 +25,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define LDI_MTP_LENGTH 24 #define GAMMA_LEVEL_NUM 25 @@ -928,7 +927,7 @@ static int s6e8aa0_get_modes(struct drm_panel *panel,
mode = drm_mode_create(connector->dev); if (!mode) { - DRM_ERROR("failed to create a new display mode\n"); + dev_err(panel->dev, "failed to create a new display mode\n"); return 0; }
On Sat, Aug 15, 2020 at 2:54 PM Sam Ravnborg sam@ravnborg.org wrote:
Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org Cc: Guido Günther agx@sigxcpu.org Cc: Linus Walleij linus.walleij@linaro.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com
At one point I was told to not use dev_* but use DRM_DEV* macros instead. "OK the DRM people want it this way, no big deal." But I'd rather do it like this so: Reviewed-by: Linus Walleij linus.walleij@linaro.org
Yours, Linus Walleij
On Sat, Aug 15, 2020 at 09:23:59PM +0200, Linus Walleij wrote:
On Sat, Aug 15, 2020 at 2:54 PM Sam Ravnborg sam@ravnborg.org wrote:
Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org Cc: Guido Günther agx@sigxcpu.org Cc: Linus Walleij linus.walleij@linaro.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com
At one point I was told to not use dev_* but use DRM_DEV* macros instead. "OK the DRM people want it this way, no big deal."
That could have been me, sorry!
But I'd rather do it like this so: Reviewed-by: Linus Walleij linus.walleij@linaro.org
Thanks!
Sam
Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org Cc: Guido Günther agx@sigxcpu.org Cc: Linus Walleij linus.walleij@linaro.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com --- .../drm/panel/panel-leadtek-ltk050h3146w.c | 58 +++++++------------ .../drm/panel/panel-leadtek-ltk500hd1829.c | 49 ++++++---------- 2 files changed, 37 insertions(+), 70 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c index eaa9da3ebbea..ed0d5f959037 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c @@ -17,7 +17,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
struct ltk050h3146w_cmd { char cmd; @@ -314,8 +313,7 @@ static int ltk050h3146w_init_sequence(struct ltk050h3146w *ctx)
ret = mipi_dsi_dcs_set_tear_on(dsi, 1); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "failed to set tear on: %d\n", - ret); + dev_err(ctx->dev, "failed to set tear on: %d\n", ret); return ret; }
@@ -360,8 +358,7 @@ static int ltk050h3146w_a2_write_page(struct ltk050h3146w *ctx, int page,
ret = ltk050h3146w_a2_select_page(ctx, page); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "failed to select page %d: %d\n", - page, ret); + dev_err(ctx->dev, "failed to select page %d: %d\n", page, ret); return ret; }
@@ -369,9 +366,7 @@ static int ltk050h3146w_a2_write_page(struct ltk050h3146w *ctx, int page, ret = mipi_dsi_generic_write(dsi, &cmds[i], sizeof(struct ltk050h3146w_cmd)); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "failed to write page %d init cmds: %d\n", - page, ret); + dev_err(ctx->dev, "failed to write page %d init cmds: %d\n", page, ret); return ret; } } @@ -405,15 +400,14 @@ static int ltk050h3146w_a2_init_sequence(struct ltk050h3146w *ctx)
ret = ltk050h3146w_a2_select_page(ctx, 0); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "failed to select page 0: %d\n", ret); + dev_err(ctx->dev, "failed to select page 0: %d\n", ret); return ret; }
/* vendor code called this without param, where there should be one */ ret = mipi_dsi_dcs_set_tear_on(dsi, 0); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "failed to set tear on: %d\n", - ret); + dev_err(ctx->dev, "failed to set tear on: %d\n", ret); return ret; }
@@ -452,15 +446,13 @@ static int ltk050h3146w_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "failed to set display off: %d\n", - ret); + dev_err(ctx->dev, "failed to set display off: %d\n", ret); return ret; }
mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "failed to enter sleep mode: %d\n", - ret); + dev_err(ctx->dev, "failed to enter sleep mode: %d\n", ret); return ret; }
@@ -481,17 +473,15 @@ static int ltk050h3146w_prepare(struct drm_panel *panel) if (ctx->prepared) return 0;
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n"); + dev_dbg(ctx->dev, "Resetting the panel\n"); ret = regulator_enable(ctx->vci); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable vci supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable vci supply: %d\n", ret); return ret; } ret = regulator_enable(ctx->iovcc); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable iovcc supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret); goto disable_vci; }
@@ -502,14 +492,13 @@ static int ltk050h3146w_prepare(struct drm_panel *panel)
ret = ctx->panel_desc->init(ctx); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n", - ret); + dev_err(ctx->dev, "Panel init sequence failed: %d\n", ret); goto disable_iovcc; }
ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Failed to exit sleep mode: %d\n", ret); + dev_err(ctx->dev, "Failed to exit sleep mode: %d\n", ret); goto disable_iovcc; }
@@ -518,7 +507,7 @@ static int ltk050h3146w_prepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_on(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Failed to set display on: %d\n", ret); + dev_err(ctx->dev, "Failed to set display on: %d\n", ret); goto disable_iovcc; }
@@ -577,7 +566,7 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi)
ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); + dev_err(dev, "cannot get reset gpio\n"); return PTR_ERR(ctx->reset_gpio); }
@@ -585,9 +574,7 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->vci)) { ret = PTR_ERR(ctx->vci); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request vci regulator: %d\n", - ret); + dev_err(dev, "Failed to request vci regulator: %d\n", ret); return ret; }
@@ -595,9 +582,7 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->iovcc)) { ret = PTR_ERR(ctx->iovcc); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request iovcc regulator: %d\n", - ret); + dev_err(dev, "Failed to request iovcc regulator: %d\n", ret); return ret; }
@@ -621,7 +606,7 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi)
ret = mipi_dsi_attach(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "mipi_dsi_attach failed: %d\n", ret); + dev_err(dev, "mipi_dsi_attach failed: %d\n", ret); drm_panel_remove(&ctx->panel); return ret; } @@ -636,13 +621,11 @@ static void ltk050h3146w_shutdown(struct mipi_dsi_device *dsi)
ret = drm_panel_unprepare(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
ret = drm_panel_disable(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to disable panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); }
static int ltk050h3146w_remove(struct mipi_dsi_device *dsi) @@ -654,8 +637,7 @@ static int ltk050h3146w_remove(struct mipi_dsi_device *dsi)
ret = mipi_dsi_detach(dsi); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n", - ret); + dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c index 0f6a248c47a5..3c00e4f8f803 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c @@ -20,7 +20,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
struct ltk500hd1829 { struct device *dev; @@ -278,13 +277,11 @@ static int ltk500hd1829_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret < 0) - DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", - ret); + dev_err(panel->dev, "failed to set display off: %d\n", ret);
ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n", - ret); + dev_err(panel->dev, "failed to enter sleep mode: %d\n", ret); }
/* 120ms to enter sleep mode */ @@ -310,14 +307,12 @@ static int ltk500hd1829_prepare(struct drm_panel *panel)
ret = regulator_enable(ctx->vcc); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable vci supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable vci supply: %d\n", ret); return ret; } ret = regulator_enable(ctx->iovcc); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable iovcc supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret); goto disable_vcc; }
@@ -333,16 +328,14 @@ static int ltk500hd1829_prepare(struct drm_panel *panel) ret = mipi_dsi_generic_write(dsi, &init_code[i], sizeof(struct ltk500hd1829_cmd)); if (ret < 0) { - DRM_DEV_ERROR(panel->dev, - "failed to write init cmds: %d\n", ret); + dev_err(panel->dev, "failed to write init cmds: %d\n", ret); goto disable_iovcc; } }
ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(panel->dev, "failed to exit sleep mode: %d\n", - ret); + dev_err(panel->dev, "failed to exit sleep mode: %d\n", ret); goto disable_iovcc; }
@@ -351,8 +344,7 @@ static int ltk500hd1829_prepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_on(dsi); if (ret < 0) { - DRM_DEV_ERROR(panel->dev, "failed to set display on: %d\n", - ret); + dev_err(panel->dev, "failed to set display on: %d\n", ret); goto disable_iovcc; }
@@ -389,9 +381,9 @@ static int ltk500hd1829_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_DEV_ERROR(ctx->dev, "failed to add mode %ux%ux@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(ctx->dev, "failed to add mode %ux%u@%u\n", + default_mode.hdisplay, default_mode.vdisplay, + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
@@ -423,7 +415,7 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi)
ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); + dev_err(dev, "cannot get reset gpio\n"); return PTR_ERR(ctx->reset_gpio); }
@@ -431,9 +423,7 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->vcc)) { ret = PTR_ERR(ctx->vcc); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request vcc regulator: %d\n", - ret); + dev_err(dev, "Failed to request vcc regulator: %d\n", ret); return ret; }
@@ -441,9 +431,7 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->iovcc)) { ret = PTR_ERR(ctx->iovcc); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request iovcc regulator: %d\n", - ret); + dev_err(dev, "Failed to request iovcc regulator: %d\n", ret); return ret; }
@@ -467,7 +455,7 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi)
ret = mipi_dsi_attach(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "mipi_dsi_attach failed: %d\n", ret); + dev_err(dev, "mipi_dsi_attach failed: %d\n", ret); drm_panel_remove(&ctx->panel); return ret; } @@ -482,13 +470,11 @@ static void ltk500hd1829_shutdown(struct mipi_dsi_device *dsi)
ret = drm_panel_unprepare(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
ret = drm_panel_disable(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to disable panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); }
static int ltk500hd1829_remove(struct mipi_dsi_device *dsi) @@ -500,8 +486,7 @@ static int ltk500hd1829_remove(struct mipi_dsi_device *dsi)
ret = mipi_dsi_detach(dsi); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to detach from DSI host: %d\n", - ret); + dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Robert Chiras robert.chiras@nxp.com Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org Cc: Guido Günther agx@sigxcpu.org Cc: Linus Walleij linus.walleij@linaro.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com --- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 33 +++++++++---------- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 18 +++++----- 2 files changed, 23 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67191.c b/drivers/gpu/drm/panel/panel-raydium-rm67191.c index 2ef322582133..23b62081e951 100644 --- a/drivers/gpu/drm/panel/panel-raydium-rm67191.c +++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c @@ -19,7 +19,6 @@ #include <drm/drm_crtc.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
/* Panel specific color-format bits */ #define COL_FMT_16BPP 0x55 @@ -329,7 +328,7 @@ static int rad_panel_enable(struct drm_panel *panel)
ret = rad_panel_push_cmd_list(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to send MCS (%d)\n", ret); + dev_err(dev, "Failed to send MCS (%d)\n", ret); goto fail; }
@@ -341,7 +340,7 @@ static int rad_panel_enable(struct drm_panel *panel) /* Software reset */ ret = mipi_dsi_dcs_soft_reset(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to do Software Reset (%d)\n", ret); + dev_err(dev, "Failed to do Software Reset (%d)\n", ret); goto fail; }
@@ -350,33 +349,32 @@ static int rad_panel_enable(struct drm_panel *panel) /* Set DSI mode */ ret = mipi_dsi_generic_write(dsi, (u8[]){ 0xC2, 0x0B }, 2); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to set DSI mode (%d)\n", ret); + dev_err(dev, "Failed to set DSI mode (%d)\n", ret); goto fail; } /* Set tear ON */ ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to set tear ON (%d)\n", ret); + dev_err(dev, "Failed to set tear ON (%d)\n", ret); goto fail; } /* Set tear scanline */ ret = mipi_dsi_dcs_set_tear_scanline(dsi, 0x380); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to set tear scanline (%d)\n", ret); + dev_err(dev, "Failed to set tear scanline (%d)\n", ret); goto fail; } /* Set pixel format */ ret = mipi_dsi_dcs_set_pixel_format(dsi, color_format); - DRM_DEV_DEBUG_DRIVER(dev, "Interface color format set to 0x%x\n", - color_format); + dev_dbg(dev, "Interface color format set to 0x%x\n", color_format); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to set pixel format (%d)\n", ret); + dev_err(dev, "Failed to set pixel format (%d)\n", ret); goto fail; } /* Exit sleep mode */ ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to exit sleep mode (%d)\n", ret); + dev_err(dev, "Failed to exit sleep mode (%d)\n", ret); goto fail; }
@@ -384,7 +382,7 @@ static int rad_panel_enable(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_on(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to set display ON (%d)\n", ret); + dev_err(dev, "Failed to set display ON (%d)\n", ret); goto fail; }
@@ -418,7 +416,7 @@ static int rad_panel_disable(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to set display OFF (%d)\n", ret); + dev_err(dev, "Failed to set display OFF (%d)\n", ret); return ret; }
@@ -426,7 +424,7 @@ static int rad_panel_disable(struct drm_panel *panel)
ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "Failed to enter sleep mode (%d)\n", ret); + dev_err(dev, "Failed to enter sleep mode (%d)\n", ret); return ret; }
@@ -442,9 +440,9 @@ static int rad_panel_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_DEV_ERROR(panel->dev, "failed to add mode %ux%ux@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", + default_mode.hdisplay, default_mode.vdisplay, + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
@@ -626,8 +624,7 @@ static int rad_panel_remove(struct mipi_dsi_device *dsi)
ret = mipi_dsi_detach(dsi); if (ret) - DRM_DEV_ERROR(dev, "Failed to detach from host (%d)\n", - ret); + dev_err(dev, "Failed to detach from host (%d)\n", ret);
drm_panel_remove(&rad->panel);
diff --git a/drivers/gpu/drm/panel/panel-raydium-rm68200.c b/drivers/gpu/drm/panel/panel-raydium-rm68200.c index 81ae8be62d15..f908eeafb1af 100644 --- a/drivers/gpu/drm/panel/panel-raydium-rm68200.c +++ b/drivers/gpu/drm/panel/panel-raydium-rm68200.c @@ -17,7 +17,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
/*** Manufacturer Command Set ***/ #define MCS_CMD_MODE_SW 0xFE /* CMD Mode Switch */ @@ -110,8 +109,7 @@ static void rm68200_dcs_write_buf(struct rm68200 *ctx, const void *data,
err = mipi_dsi_dcs_write_buffer(dsi, data, len); if (err < 0) - DRM_ERROR_RATELIMITED("MIPI DSI DCS write buffer failed: %d\n", - err); + dev_err_ratelimited(ctx->dev, "MIPI DSI DCS write buffer failed: %d\n", err); }
static void rm68200_dcs_write_cmd(struct rm68200 *ctx, u8 cmd, u8 value) @@ -121,7 +119,7 @@ static void rm68200_dcs_write_cmd(struct rm68200 *ctx, u8 cmd, u8 value)
err = mipi_dsi_dcs_write(dsi, cmd, &value, 1); if (err < 0) - DRM_ERROR_RATELIMITED("MIPI DSI DCS write failed: %d\n", err); + dev_err_ratelimited(ctx->dev, "MIPI DSI DCS write failed: %d\n", err); }
#define dcs_write_seq(ctx, seq...) \ @@ -256,11 +254,11 @@ static int rm68200_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret) - DRM_WARN("failed to set display off: %d\n", ret); + dev_warn(panel->dev, "failed to set display off: %d\n", ret);
ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret) - DRM_WARN("failed to enter sleep mode: %d\n", ret); + dev_warn(panel->dev, "failed to enter sleep mode: %d\n", ret);
msleep(120);
@@ -287,7 +285,7 @@ static int rm68200_prepare(struct drm_panel *panel)
ret = regulator_enable(ctx->supply); if (ret < 0) { - DRM_ERROR("failed to enable supply: %d\n", ret); + dev_err(ctx->dev, "failed to enable supply: %d\n", ret); return ret; }
@@ -336,9 +334,9 @@ static int rm68200_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_ERROR("failed to add mode %ux%ux@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", + default_mode.hdisplay, default_mode.vdisplay, + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Jagan Teki jagan@amarulasolutions.com Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org Cc: Guido Günther agx@sigxcpu.org Cc: Linus Walleij linus.walleij@linaro.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com --- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 10 ++- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 61 +++++++------------ 2 files changed, 27 insertions(+), 44 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c index 12462114a52d..4d2a149b202c 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c @@ -7,7 +7,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#include <linux/gpio/consumer.h> #include <linux/delay.h> @@ -269,10 +268,9 @@ static int st7701_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, desc_mode); if (!mode) { - DRM_DEV_ERROR(&st7701->dsi->dev, - "failed to add mode %ux%ux@%u\n", - desc_mode->hdisplay, desc_mode->vdisplay, - drm_mode_vrefresh(desc_mode)); + dev_err(&st7701->dsi->dev, "failed to add mode %ux%u@%u\n", + desc_mode->hdisplay, desc_mode->vdisplay, + drm_mode_vrefresh(desc_mode)); return -ENOMEM; }
@@ -358,7 +356,7 @@ static int st7701_dsi_probe(struct mipi_dsi_device *dsi)
st7701->reset = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(st7701->reset)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get our reset GPIO\n"); + dev_err(&dsi->dev, "Couldn't get our reset GPIO\n"); return PTR_ERR(st7701->reset); }
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index 8996ced2b721..c22e7c49e077 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -22,7 +22,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define DRV_NAME "panel-sitronix-st7703"
@@ -364,8 +363,7 @@ static int st7703_enable(struct drm_panel *panel)
ret = ctx->desc->init_sequence(ctx); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n", - ret); + dev_err(ctx->dev, "Panel init sequence failed: %d\n", ret); return ret; }
@@ -373,7 +371,7 @@ static int st7703_enable(struct drm_panel *panel)
ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Failed to exit sleep mode: %d\n", ret); + dev_err(ctx->dev, "Failed to exit sleep mode: %d\n", ret); return ret; }
@@ -384,7 +382,7 @@ static int st7703_enable(struct drm_panel *panel) if (ret) return ret;
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Panel init sequence done\n"); + dev_dbg(ctx->dev, "Panel init sequence done\n");
return 0; } @@ -397,13 +395,11 @@ static int st7703_disable(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret < 0) - DRM_DEV_ERROR(ctx->dev, - "Failed to turn off the display: %d\n", ret); + dev_err(ctx->dev, "Failed to turn off the display: %d\n", ret);
ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret < 0) - DRM_DEV_ERROR(ctx->dev, - "Failed to enter sleep mode: %d\n", ret); + dev_err(ctx->dev, "Failed to enter sleep mode: %d\n", ret);
return 0; } @@ -431,17 +427,15 @@ static int st7703_prepare(struct drm_panel *panel) if (ctx->prepared) return 0;
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n"); + dev_dbg(ctx->dev, "Resetting the panel\n"); ret = regulator_enable(ctx->vcc); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable vcc supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable vcc supply: %d\n", ret); return ret; } ret = regulator_enable(ctx->iovcc); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable iovcc supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret); goto disable_vcc; }
@@ -467,9 +461,9 @@ static int st7703_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, ctx->desc->mode); if (!mode) { - DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n", - ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay, - drm_mode_vrefresh(ctx->desc->mode)); + dev_err(ctx->dev, "Failed to add mode %ux%u@%u\n", + ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay, + drm_mode_vrefresh(ctx->desc->mode)); return -ENOMEM; }
@@ -496,7 +490,7 @@ static int allpixelson_set(void *data, u64 val) struct st7703 *ctx = data; struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Setting all pixels on\n"); + dev_dbg(ctx->dev, "Setting all pixels on\n"); dsi_generic_write_seq(dsi, ST7703_CMD_ALL_PIXEL_ON); msleep(val * 1000); /* Reset the panel to get video back */ @@ -537,7 +531,7 @@ static int st7703_probe(struct mipi_dsi_device *dsi)
ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); + dev_err(dev, "cannot get reset gpio\n"); return PTR_ERR(ctx->reset_gpio); }
@@ -554,18 +548,14 @@ static int st7703_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->vcc)) { ret = PTR_ERR(ctx->vcc); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request vcc regulator: %d\n", - ret); + dev_err(dev, "Failed to request vcc regulator: %d\n", ret); return ret; } ctx->iovcc = devm_regulator_get(dev, "iovcc"); if (IS_ERR(ctx->iovcc)) { ret = PTR_ERR(ctx->iovcc); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request iovcc regulator: %d\n", - ret); + dev_err(dev, "Failed to request iovcc regulator: %d\n", ret); return ret; }
@@ -580,17 +570,15 @@ static int st7703_probe(struct mipi_dsi_device *dsi)
ret = mipi_dsi_attach(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, - "mipi_dsi_attach failed (%d). Is host ready?\n", - ret); + dev_err(dev, "mipi_dsi_attach failed (%d). Is host ready?\n", ret); drm_panel_remove(&ctx->panel); return ret; }
- DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n", - ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay, - drm_mode_vrefresh(ctx->desc->mode), - mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); + dev_info(dev, "%ux%u@%u %ubpp dsi %udl - ready\n", + ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay, + drm_mode_vrefresh(ctx->desc->mode), + mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes);
st7703_debugfs_init(ctx); return 0; @@ -603,13 +591,11 @@ static void st7703_shutdown(struct mipi_dsi_device *dsi)
ret = drm_panel_unprepare(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
ret = drm_panel_disable(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to disable panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); }
static int st7703_remove(struct mipi_dsi_device *dsi) @@ -621,8 +607,7 @@ static int st7703_remove(struct mipi_dsi_device *dsi)
ret = mipi_dsi_detach(dsi); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n", - ret); + dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Jerry Han hanxu5@huaqin.corp-partner.google.com Cc: Thierry Reding thierry.reding@gmail.com Cc: Sam Ravnborg sam@ravnborg.org Cc: Icenowy Zheng icenowy@aosc.io Cc: Jagan Teki jagan@amarulasolutions.com Cc: Linus Walleij linus.walleij@linaro.org Cc: Guido Günther agx@sigxcpu.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com --- drivers/gpu/drm/panel/panel-boe-himax8279d.c | 44 ++++------ drivers/gpu/drm/panel/panel-elida-kd35t133.c | 51 +++++------- .../gpu/drm/panel/panel-feixin-k101-im2ba02.c | 19 ++--- .../drm/panel/panel-feiyang-fy07024di26a30d.c | 21 +++-- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 3 +- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 31 +++---- .../drm/panel/panel-kingdisplay-kd097d04.c | 33 +++----- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 40 ++++----- .../gpu/drm/panel/panel-orisetech-otm8009a.c | 13 ++- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 16 ++-- drivers/gpu/drm/panel/panel-sony-acx424akp.c | 81 +++++++------------ drivers/gpu/drm/panel/panel-tpo-tpg110.c | 38 ++++----- drivers/gpu/drm/panel/panel-truly-nt35597.c | 63 +++++---------- .../gpu/drm/panel/panel-visionox-rm69299.c | 41 +++------- .../gpu/drm/panel/panel-xinpeng-xpp055c272.c | 51 +++++------- 15 files changed, 200 insertions(+), 345 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c index d676b4c2a8fa..42854bd37fd5 100644 --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c @@ -19,7 +19,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#include <video/mipi_display.h>
@@ -93,8 +92,7 @@ static int boe_panel_disable(struct drm_panel *panel)
err = mipi_dsi_dcs_set_display_off(pinfo->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", - err); + dev_err(panel->dev, "failed to set display off: %d\n", err); return err; }
@@ -113,13 +111,11 @@ static int boe_panel_unprepare(struct drm_panel *panel)
err = mipi_dsi_dcs_set_display_off(pinfo->link); if (err < 0) - DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", - err); + dev_err(panel->dev, "failed to set display off: %d\n", err);
err = mipi_dsi_dcs_enter_sleep_mode(pinfo->link); if (err < 0) - DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n", - err); + dev_err(panel->dev, "failed to enter sleep mode: %d\n", err);
/* sleep_mode_delay: 1ms - 2ms */ usleep_range(1000, 2000); @@ -163,15 +159,13 @@ static int boe_panel_prepare(struct drm_panel *panel) /* send init code */ err = send_mipi_cmds(panel, pinfo->desc->on_cmds); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to send DCS Init Code: %d\n", - err); + dev_err(panel->dev, "failed to send DCS Init Code: %d\n", err); goto poweroff; }
err = mipi_dsi_dcs_exit_sleep_mode(pinfo->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to exit sleep mode: %d\n", - err); + dev_err(panel->dev, "failed to exit sleep mode: %d\n", err); goto poweroff; }
@@ -180,8 +174,7 @@ static int boe_panel_prepare(struct drm_panel *panel)
err = mipi_dsi_dcs_set_display_on(pinfo->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to set display on: %d\n", - err); + dev_err(panel->dev, "failed to set display on: %d\n", err); goto poweroff; }
@@ -209,8 +202,7 @@ static int boe_panel_enable(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_on(pinfo->link); if (ret < 0) { - DRM_DEV_ERROR(panel->dev, "failed to set display on: %d\n", - ret); + dev_err(panel->dev, "failed to set display on: %d\n", ret); return ret; }
@@ -228,8 +220,8 @@ static int boe_panel_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, m); if (!mode) { - DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); + dev_err(pinfo->base.dev, "failed to add mode %ux%u@%u\n", + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); return -ENOMEM; }
@@ -865,8 +857,7 @@ static int panel_add(struct panel_info *pinfo) if (IS_ERR(pinfo->pp18_gpio)) { ret = PTR_ERR(pinfo->pp18_gpio); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, "failed to get pp18 gpio: %d\n", - ret); + dev_err(dev, "failed to get pp18 gpio: %d\n", ret); return ret; }
@@ -874,8 +865,7 @@ static int panel_add(struct panel_info *pinfo) if (IS_ERR(pinfo->pp33_gpio)) { ret = PTR_ERR(pinfo->pp33_gpio); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, "failed to get pp33 gpio: %d\n", - ret); + dev_err(dev, "failed to get pp33 gpio: %d\n", ret); return ret; }
@@ -883,8 +873,7 @@ static int panel_add(struct panel_info *pinfo) if (IS_ERR(pinfo->enable_gpio)) { ret = PTR_ERR(pinfo->enable_gpio); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, "failed to get enable gpio: %d\n", - ret); + dev_err(dev, "failed to get enable gpio: %d\n", ret); return ret; }
@@ -937,18 +926,15 @@ static int panel_remove(struct mipi_dsi_device *dsi)
err = boe_panel_disable(&pinfo->base); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to disable panel: %d\n", - err); + dev_err(&dsi->dev, "failed to disable panel: %d\n", err);
err = boe_panel_unprepare(&pinfo->base); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to unprepare panel: %d\n", - err); + dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err);
err = mipi_dsi_detach(dsi); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to detach from DSI host: %d\n", - err); + dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
drm_panel_remove(&pinfo->base);
diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index e9675514d77b..bc36aa3c1123 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -22,7 +22,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
/* Manufacturer specific Commands send via DSI */ #define KD35T133_CMD_INTERFACEMODECTRL 0xb0 @@ -89,7 +88,7 @@ static int kd35t133_init_sequence(struct kd35t133 *ctx) 0xa9, 0x51, 0x2c, 0x82); mipi_dsi_dcs_write(dsi, MIPI_DCS_ENTER_INVERT_MODE, NULL, 0);
- DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n"); + dev_dbg(dev, "Panel init sequence done\n"); return 0; }
@@ -104,13 +103,11 @@ static int kd35t133_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret < 0) - DRM_DEV_ERROR(ctx->dev, "failed to set display off: %d\n", - ret); + dev_err(ctx->dev, "failed to set display off: %d\n", ret);
ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "failed to enter sleep mode: %d\n", - ret); + dev_err(ctx->dev, "failed to enter sleep mode: %d\n", ret); return ret; }
@@ -131,18 +128,16 @@ static int kd35t133_prepare(struct drm_panel *panel) if (ctx->prepared) return 0;
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n"); + dev_dbg(ctx->dev, "Resetting the panel\n"); ret = regulator_enable(ctx->vdd); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable vdd supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable vdd supply: %d\n", ret); return ret; }
ret = regulator_enable(ctx->iovcc); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable iovcc supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret); goto disable_vdd; }
@@ -156,7 +151,7 @@ static int kd35t133_prepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Failed to exit sleep mode: %d\n", ret); + dev_err(ctx->dev, "Failed to exit sleep mode: %d\n", ret); goto disable_iovcc; }
@@ -164,14 +159,13 @@ static int kd35t133_prepare(struct drm_panel *panel)
ret = kd35t133_init_sequence(ctx); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n", - ret); + dev_err(ctx->dev, "Panel init sequence failed: %d\n", ret); goto disable_iovcc; }
ret = mipi_dsi_dcs_set_display_on(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Failed to set display on: %d\n", ret); + dev_err(ctx->dev, "Failed to set display on: %d\n", ret); goto disable_iovcc; }
@@ -210,9 +204,9 @@ static int kd35t133_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(ctx->dev, "Failed to add mode %ux%u@%u\n", + default_mode.hdisplay, default_mode.vdisplay, + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
@@ -244,7 +238,7 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi)
ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); + dev_err(dev, "cannot get reset gpio\n"); return PTR_ERR(ctx->reset_gpio); }
@@ -252,9 +246,7 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->vdd)) { ret = PTR_ERR(ctx->vdd); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request vdd regulator: %d\n", - ret); + dev_err(dev, "Failed to request vdd regulator: %d\n", ret); return ret; }
@@ -262,9 +254,7 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->iovcc)) { ret = PTR_ERR(ctx->iovcc); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request iovcc regulator: %d\n", - ret); + dev_err(dev, "Failed to request iovcc regulator: %d\n", ret); return ret; }
@@ -288,7 +278,7 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi)
ret = mipi_dsi_attach(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "mipi_dsi_attach failed: %d\n", ret); + dev_err(dev, "mipi_dsi_attach failed: %d\n", ret); drm_panel_remove(&ctx->panel); return ret; } @@ -303,13 +293,11 @@ static void kd35t133_shutdown(struct mipi_dsi_device *dsi)
ret = drm_panel_unprepare(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
ret = drm_panel_disable(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to disable panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); }
static int kd35t133_remove(struct mipi_dsi_device *dsi) @@ -321,8 +309,7 @@ static int kd35t133_remove(struct mipi_dsi_device *dsi)
ret = mipi_dsi_detach(dsi); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n", - ret); + dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
diff --git a/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c b/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c index 0b7e82e5ba4e..2a602aee61c3 100644 --- a/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c +++ b/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c @@ -13,7 +13,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define K101_IM2BA02_INIT_CMD_LEN 2
@@ -374,13 +373,11 @@ static int k101_im2ba02_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(ctx->dsi); if (ret < 0) - DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", - ret); + dev_err(panel->dev, "failed to set display off: %d\n", ret);
ret = mipi_dsi_dcs_enter_sleep_mode(ctx->dsi); if (ret < 0) - DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n", - ret); + dev_err(panel->dev, "failed to enter sleep mode: %d\n", ret);
msleep(200);
@@ -416,10 +413,10 @@ static int k101_im2ba02_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &k101_im2ba02_default_mode); if (!mode) { - DRM_DEV_ERROR(&ctx->dsi->dev, "failed to add mode %ux%ux@%u\n", - k101_im2ba02_default_mode.hdisplay, - k101_im2ba02_default_mode.vdisplay, - drm_mode_vrefresh(&k101_im2ba02_default_mode)); + dev_err(&ctx->dsi->dev, "failed to add mode %ux%u@%u\n", + k101_im2ba02_default_mode.hdisplay, + k101_im2ba02_default_mode.vdisplay, + drm_mode_vrefresh(&k101_im2ba02_default_mode)); return -ENOMEM; }
@@ -460,13 +457,13 @@ static int k101_im2ba02_dsi_probe(struct mipi_dsi_device *dsi) ret = devm_regulator_bulk_get(&dsi->dev, ARRAY_SIZE(ctx->supplies), ctx->supplies); if (ret < 0) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get regulators\n"); + dev_err(&dsi->dev, "Couldn't get regulators\n"); return ret; }
ctx->reset = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get our reset GPIO\n"); + dev_err(&dsi->dev, "Couldn't get our reset GPIO\n"); return PTR_ERR(ctx->reset); }
diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c index f9edee69fea4..581661b506f8 100644 --- a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c +++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c @@ -7,7 +7,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#include <linux/gpio/consumer.h> #include <linux/delay.h> @@ -118,13 +117,11 @@ static int feiyang_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(ctx->dsi); if (ret < 0) - DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", - ret); + dev_err(panel->dev, "failed to set display off: %d\n", ret);
ret = mipi_dsi_dcs_enter_sleep_mode(ctx->dsi); if (ret < 0) - DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n", - ret); + dev_err(panel->dev, "failed to enter sleep mode: %d\n", ret);
/* T13 (backlight fall + video & logic signal fall) T13 >= 200ms */ msleep(200); @@ -165,10 +162,10 @@ static int feiyang_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &feiyang_default_mode); if (!mode) { - DRM_DEV_ERROR(&ctx->dsi->dev, "failed to add mode %ux%ux@%u\n", - feiyang_default_mode.hdisplay, - feiyang_default_mode.vdisplay, - drm_mode_vrefresh(&feiyang_default_mode)); + dev_err(&ctx->dsi->dev, "failed to add mode %ux%u@%u\n", + feiyang_default_mode.hdisplay, + feiyang_default_mode.vdisplay, + drm_mode_vrefresh(&feiyang_default_mode)); return -ENOMEM; }
@@ -204,19 +201,19 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi)
ctx->dvdd = devm_regulator_get(&dsi->dev, "dvdd"); if (IS_ERR(ctx->dvdd)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get dvdd regulator\n"); + dev_err(&dsi->dev, "Couldn't get dvdd regulator\n"); return PTR_ERR(ctx->dvdd); }
ctx->avdd = devm_regulator_get(&dsi->dev, "avdd"); if (IS_ERR(ctx->avdd)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get avdd regulator\n"); + dev_err(&dsi->dev, "Couldn't get avdd regulator\n"); return PTR_ERR(ctx->avdd); }
ctx->reset = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get our reset GPIO\n"); + dev_err(&dsi->dev, "Couldn't get our reset GPIO\n"); return PTR_ERR(ctx->reset); }
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c index 968845894725..074e18559b9f 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c @@ -33,7 +33,6 @@
#include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define ILI9322_CHIP_ID 0x00 #define ILI9322_CHIP_ID_MAGIC 0x96 @@ -683,7 +682,7 @@ static int ili9322_get_modes(struct drm_panel *panel, break; } if (!mode) { - DRM_ERROR("bad mode or failed to add mode\n"); + dev_err(panel->dev, "bad mode or failed to add mode\n"); return -EINVAL; } drm_mode_set_name(mode); diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index 1a8e69c64125..aea316225391 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -17,7 +17,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
struct panel_init_cmd { size_t len; @@ -85,13 +84,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
err = mipi_dsi_dcs_set_display_off(innolux->link); if (err < 0) - DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", - err); + dev_err(panel->dev, "failed to set display off: %d\n", err);
err = mipi_dsi_dcs_enter_sleep_mode(innolux->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n", - err); + dev_err(panel->dev, "failed to enter sleep mode: %d\n", err); return err; }
@@ -147,8 +144,7 @@ static int innolux_panel_prepare(struct drm_panel *panel) err = mipi_dsi_generic_write(innolux->link, cmd->data, cmd->len); if (err < 0) { - dev_err(panel->dev, - "failed to write command %u\n", i); + dev_err(panel->dev, "failed to write command %u\n", i); goto poweroff; }
@@ -159,8 +155,7 @@ static int innolux_panel_prepare(struct drm_panel *panel) */ err = mipi_dsi_dcs_nop(innolux->link); if (err < 0) { - dev_err(panel->dev, - "failed to send DCS nop: %d\n", err); + dev_err(panel->dev, "failed to send DCS nop: %d\n", err); goto poweroff; } } @@ -168,8 +163,7 @@ static int innolux_panel_prepare(struct drm_panel *panel)
err = mipi_dsi_dcs_exit_sleep_mode(innolux->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to exit sleep mode: %d\n", - err); + dev_err(panel->dev, "failed to exit sleep mode: %d\n", err); goto poweroff; }
@@ -178,8 +172,7 @@ static int innolux_panel_prepare(struct drm_panel *panel)
err = mipi_dsi_dcs_set_display_on(innolux->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to set display on: %d\n", - err); + dev_err(panel->dev, "failed to set display on: %d\n", err); goto poweroff; }
@@ -398,8 +391,8 @@ static int innolux_panel_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, m); if (!mode) { - DRM_DEV_ERROR(panel->dev, "failed to add mode %ux%ux@%u\n", - m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); return -ENOMEM; }
@@ -512,17 +505,15 @@ static int innolux_panel_remove(struct mipi_dsi_device *dsi)
err = drm_panel_unprepare(&innolux->base); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to unprepare panel: %d\n", - err); + dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err);
err = drm_panel_disable(&innolux->base); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to disable panel: %d\n", err); + dev_err(&dsi->dev, "failed to disable panel: %d\n", err);
err = mipi_dsi_detach(dsi); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to detach from DSI host: %d\n", - err); + dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
innolux_panel_del(innolux);
diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c index f42dc2ceeb07..86e4213e8bb1 100644 --- a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c +++ b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c @@ -16,7 +16,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
struct kingdisplay_panel { struct drm_panel base; @@ -191,8 +190,7 @@ static int kingdisplay_panel_disable(struct drm_panel *panel)
err = mipi_dsi_dcs_set_display_off(kingdisplay->link); if (err < 0) - DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", - err); + dev_err(panel->dev, "failed to set display off: %d\n", err);
kingdisplay->enabled = false;
@@ -209,8 +207,7 @@ static int kingdisplay_panel_unprepare(struct drm_panel *panel)
err = mipi_dsi_dcs_enter_sleep_mode(kingdisplay->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n", - err); + dev_err(panel->dev, "failed to enter sleep mode: %d\n", err); return err; }
@@ -255,16 +252,14 @@ static int kingdisplay_panel_prepare(struct drm_panel *panel) err = mipi_dsi_generic_write(kingdisplay->link, &init_code[i], sizeof(struct kingdisplay_panel_cmd)); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed write init cmds: %d\n", - err); + dev_err(panel->dev, "failed write init cmds: %d\n", err); goto poweroff; } }
err = mipi_dsi_dcs_exit_sleep_mode(kingdisplay->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to exit sleep mode: %d\n", - err); + dev_err(panel->dev, "failed to exit sleep mode: %d\n", err); goto poweroff; }
@@ -273,8 +268,7 @@ static int kingdisplay_panel_prepare(struct drm_panel *panel)
err = mipi_dsi_dcs_set_display_on(kingdisplay->link); if (err < 0) { - DRM_DEV_ERROR(panel->dev, "failed to set display on: %d\n", - err); + dev_err(panel->dev, "failed to set display on: %d\n", err); goto poweroff; }
@@ -290,8 +284,7 @@ static int kingdisplay_panel_prepare(struct drm_panel *panel)
regulator_err = regulator_disable(kingdisplay->supply); if (regulator_err) - DRM_DEV_ERROR(panel->dev, "failed to disable regulator: %d\n", - regulator_err); + dev_err(panel->dev, "failed to disable regulator: %d\n", regulator_err);
return err; } @@ -327,9 +320,9 @@ static int kingdisplay_panel_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_DEV_ERROR(panel->dev, "failed to add mode %ux%ux@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", + default_mode.hdisplay, default_mode.vdisplay, + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
@@ -423,17 +416,15 @@ static int kingdisplay_panel_remove(struct mipi_dsi_device *dsi)
err = drm_panel_unprepare(&kingdisplay->base); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to unprepare panel: %d\n", - err); + dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err);
err = drm_panel_disable(&kingdisplay->base); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to disable panel: %d\n", err); + dev_err(&dsi->dev, "failed to disable panel: %d\n", err);
err = mipi_dsi_detach(dsi); if (err < 0) - DRM_DEV_ERROR(&dsi->dev, "failed to detach from DSI host: %d\n", - err); + dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
kingdisplay_panel_del(kingdisplay);
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c index 64c8cf2bae7c..b9a0e56f33e2 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c @@ -35,7 +35,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define MCS_CMD_MAUCCTR 0xF0 /* Manufacturer command enable */ #define MCS_CMD_READ_ID1 0xDA @@ -404,9 +403,7 @@ static int nt35510_send_long(struct nt35510 *nt, struct mipi_dsi_device *dsi, chunk = 15; ret = mipi_dsi_dcs_write(dsi, cmd, seqp, chunk); if (ret < 0) { - DRM_DEV_ERROR(nt->dev, - "error sending DCS command seq cmd %02x\n", - cmd); + dev_err(nt->dev, "error sending DCS command seq cmd %02x\n", cmd); return ret; } cmdwritten += chunk; @@ -418,16 +415,13 @@ static int nt35510_send_long(struct nt35510 *nt, struct mipi_dsi_device *dsi, chunk = 15; ret = mipi_dsi_generic_write(dsi, seqp, chunk); if (ret < 0) { - DRM_DEV_ERROR(nt->dev, - "error sending generic write seq %02x\n", - cmd); + dev_err(nt->dev, "error sending generic write seq %02x\n", cmd); return ret; } cmdwritten += chunk; seqp += chunk; } - DRM_DEV_DEBUG(nt->dev, "sent command %02x %02x bytes\n", - cmd, cmdlen); + dev_dbg(nt->dev, "sent command %02x %02x bytes\n", cmd, cmdlen); return 0; }
@@ -439,17 +433,17 @@ static int nt35510_read_id(struct nt35510 *nt)
ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID1, &id1, 1); if (ret < 0) { - DRM_DEV_ERROR(nt->dev, "could not read MTP ID1\n"); + dev_err(nt->dev, "could not read MTP ID1\n"); return ret; } ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID2, &id2, 1); if (ret < 0) { - DRM_DEV_ERROR(nt->dev, "could not read MTP ID2\n"); + dev_err(nt->dev, "could not read MTP ID2\n"); return ret; } ret = mipi_dsi_dcs_read(dsi, MCS_CMD_READ_ID3, &id3, 1); if (ret < 0) { - DRM_DEV_ERROR(nt->dev, "could not read MTP ID3\n"); + dev_err(nt->dev, "could not read MTP ID3\n"); return ret; }
@@ -458,9 +452,7 @@ static int nt35510_read_id(struct nt35510 *nt) * ID (e.g. Hydis 0x55), driver ID (e.g. NT35510 0xc0) and * version. */ - DRM_DEV_INFO(nt->dev, - "MTP ID manufacturer: %02x version: %02x driver: %02x\n", - id1, id2, id3); + dev_info(nt->dev, "MTP ID manufacturer: %02x version: %02x driver: %02x\n", id1, id2, id3);
return 0; } @@ -661,7 +653,7 @@ static int nt35510_set_brightness(struct backlight_device *bl) u8 brightness = bl->props.brightness; int ret;
- DRM_DEV_DEBUG(nt->dev, "set brightness %d\n", brightness); + dev_dbg(nt->dev, "set brightness %d\n", brightness); ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, &brightness, sizeof(brightness)); @@ -796,8 +788,7 @@ static int nt35510_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret) { - DRM_DEV_ERROR(nt->dev, "failed to turn display off (%d)\n", - ret); + dev_err(nt->dev, "failed to turn display off (%d)\n", ret); return ret; } usleep_range(10000, 20000); @@ -805,8 +796,7 @@ static int nt35510_unprepare(struct drm_panel *panel) /* Enter sleep mode */ ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret) { - DRM_DEV_ERROR(nt->dev, "failed to enter sleep mode (%d)\n", - ret); + dev_err(nt->dev, "failed to enter sleep mode (%d)\n", ret); return ret; }
@@ -833,8 +823,7 @@ static int nt35510_prepare(struct drm_panel *panel) /* Exit sleep mode */ ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret) { - DRM_DEV_ERROR(nt->dev, "failed to exit sleep mode (%d)\n", - ret); + dev_err(nt->dev, "failed to exit sleep mode (%d)\n", ret); return ret; } /* Up to 120 ms */ @@ -842,8 +831,7 @@ static int nt35510_prepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_on(dsi); if (ret) { - DRM_DEV_ERROR(nt->dev, "failed to turn display on (%d)\n", - ret); + dev_err(nt->dev, "failed to turn display on (%d)\n", ret); return ret; } /* Some 10 ms */ @@ -864,7 +852,7 @@ static int nt35510_get_modes(struct drm_panel *panel, info->height_mm = nt->conf->height_mm; mode = drm_mode_duplicate(connector->dev, &nt->conf->mode); if (!mode) { - DRM_ERROR("bad mode or failed to add mode\n"); + dev_err(panel->dev, "bad mode or failed to add mode\n"); return -EINVAL; } drm_mode_set_name(mode); @@ -963,7 +951,7 @@ static int nt35510_probe(struct mipi_dsi_device *dsi) bl = devm_backlight_device_register(dev, "nt35510", dev, nt, &nt35510_bl_ops, NULL); if (IS_ERR(bl)) { - DRM_DEV_ERROR(dev, "failed to register backlight device\n"); + dev_err(dev, "failed to register backlight device\n"); return PTR_ERR(bl); } bl->props.max_brightness = 255; diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c index d956522f32ee..b6e377aa1131 100644 --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c @@ -17,7 +17,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define OTM8009A_BACKLIGHT_DEFAULT 240 #define OTM8009A_BACKLIGHT_MAX 255 @@ -97,7 +96,7 @@ static void otm8009a_dcs_write_buf(struct otm8009a *ctx, const void *data, struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
if (mipi_dsi_dcs_write_buffer(dsi, data, len) < 0) - DRM_WARN("mipi dsi dcs write buffer failed\n"); + dev_warn(ctx->dev, "mipi dsi dcs write buffer failed\n"); }
static void otm8009a_dcs_write_buf_hs(struct otm8009a *ctx, const void *data, @@ -313,7 +312,7 @@ static int otm8009a_prepare(struct drm_panel *panel)
ret = regulator_enable(ctx->supply); if (ret < 0) { - DRM_ERROR("failed to enable supply: %d\n", ret); + dev_err(panel->dev, "failed to enable supply: %d\n", ret); return ret; }
@@ -355,9 +354,9 @@ static int otm8009a_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_ERROR("failed to add mode %ux%ux@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", + default_mode.hdisplay, default_mode.vdisplay, + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
@@ -390,7 +389,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd) u8 data[2];
if (!ctx->prepared) { - DRM_DEBUG("lcd not ready yet for setting its backlight!\n"); + dev_dbg(&bd->dev, "lcd not ready yet for setting its backlight!\n"); return -ENXIO; }
diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c index ea74958d7544..535c8d1cca21 100644 --- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c @@ -23,7 +23,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
struct rb070d30_panel { struct drm_panel panel; @@ -50,7 +49,7 @@ static int rb070d30_panel_prepare(struct drm_panel *panel)
ret = regulator_enable(ctx->supply); if (ret < 0) { - DRM_DEV_ERROR(&ctx->dsi->dev, "Failed to enable supply: %d\n", ret); + dev_err(&ctx->dsi->dev, "Failed to enable supply: %d\n", ret); return ret; }
@@ -117,9 +116,8 @@ static int rb070d30_panel_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_DEV_ERROR(&ctx->dsi->dev, - "Failed to add mode " DRM_MODE_FMT "\n", - DRM_MODE_ARG(&default_mode)); + dev_err(&ctx->dsi->dev, "Failed to add mode " DRM_MODE_FMT "\n", + DRM_MODE_ARG(&default_mode)); return -EINVAL; }
@@ -166,13 +164,13 @@ static int rb070d30_panel_dsi_probe(struct mipi_dsi_device *dsi)
ctx->gpios.reset = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->gpios.reset)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get our reset GPIO\n"); + dev_err(&dsi->dev, "Couldn't get our reset GPIO\n"); return PTR_ERR(ctx->gpios.reset); }
ctx->gpios.power = devm_gpiod_get(&dsi->dev, "power", GPIOD_OUT_LOW); if (IS_ERR(ctx->gpios.power)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get our power GPIO\n"); + dev_err(&dsi->dev, "Couldn't get our power GPIO\n"); return PTR_ERR(ctx->gpios.power); }
@@ -182,7 +180,7 @@ static int rb070d30_panel_dsi_probe(struct mipi_dsi_device *dsi) */ ctx->gpios.updn = devm_gpiod_get(&dsi->dev, "updn", GPIOD_OUT_LOW); if (IS_ERR(ctx->gpios.updn)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get our updn GPIO\n"); + dev_err(&dsi->dev, "Couldn't get our updn GPIO\n"); return PTR_ERR(ctx->gpios.updn); }
@@ -192,7 +190,7 @@ static int rb070d30_panel_dsi_probe(struct mipi_dsi_device *dsi) */ ctx->gpios.shlr = devm_gpiod_get(&dsi->dev, "shlr", GPIOD_OUT_LOW); if (IS_ERR(ctx->gpios.shlr)) { - DRM_DEV_ERROR(&dsi->dev, "Couldn't get our shlr GPIO\n"); + dev_err(&dsi->dev, "Couldn't get our shlr GPIO\n"); return PTR_ERR(ctx->gpios.shlr); }
diff --git a/drivers/gpu/drm/panel/panel-sony-acx424akp.c b/drivers/gpu/drm/panel/panel-sony-acx424akp.c index 57575c40f2aa..065efae213f5 100644 --- a/drivers/gpu/drm/panel/panel-sony-acx424akp.c +++ b/drivers/gpu/drm/panel/panel-sony-acx424akp.c @@ -20,7 +20,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#define ACX424_DCS_READ_ID1 0xDA #define ACX424_DCS_READ_ID2 0xDB @@ -110,13 +109,11 @@ static int acx424akp_set_brightness(struct backlight_device *bl) SCALE_FACTOR_NS_DIV_MHZ);
/* Set up PWM dutycycle ONE byte (differs from the standard) */ - DRM_DEV_DEBUG(acx->dev, "calculated duty cycle %02x\n", pwm_ratio); + dev_dbg(acx->dev, "calculated duty cycle %02x\n", pwm_ratio); ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, &pwm_ratio, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, - "failed to set display PWM ratio (%d)\n", - ret); + dev_err(acx->dev, "failed to set display PWM ratio (%d)\n", ret); return ret; }
@@ -132,40 +129,30 @@ static int acx424akp_set_brightness(struct backlight_device *bl) par = 0xaa; ret = mipi_dsi_dcs_write(dsi, 0xf3, &par, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, - "failed to unlock CMD 2 (%d)\n", - ret); + dev_err(acx->dev, "failed to unlock CMD 2 (%d)\n", ret); return ret; } par = 0x01; ret = mipi_dsi_dcs_write(dsi, 0x00, &par, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, - "failed to enter page 1 (%d)\n", - ret); + dev_err(acx->dev, "failed to enter page 1 (%d)\n", ret); return ret; } par = 0x01; ret = mipi_dsi_dcs_write(dsi, 0x7d, &par, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, - "failed to disable MTP reload (%d)\n", - ret); + dev_err(acx->dev, "failed to disable MTP reload (%d)\n", ret); return ret; } ret = mipi_dsi_dcs_write(dsi, 0x22, &pwm_div, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, - "failed to set PWM divisor (%d)\n", - ret); + dev_err(acx->dev, "failed to set PWM divisor (%d)\n", ret); return ret; } par = 0xaa; ret = mipi_dsi_dcs_write(dsi, 0x7f, &par, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, - "failed to lock CMD 2 (%d)\n", - ret); + dev_err(acx->dev, "failed to lock CMD 2 (%d)\n", ret); return ret; }
@@ -174,9 +161,7 @@ static int acx424akp_set_brightness(struct backlight_device *bl) ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, &par, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, - "failed to enable display backlight (%d)\n", - ret); + dev_err(acx->dev, "failed to enable display backlight (%d)\n", ret); return ret; }
@@ -196,22 +181,22 @@ static int acx424akp_read_id(struct acx424akp *acx)
ret = mipi_dsi_dcs_read(dsi, ACX424_DCS_READ_ID1, &vendor, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, "could not vendor ID byte\n"); + dev_err(acx->dev, "could not vendor ID byte\n"); return ret; } ret = mipi_dsi_dcs_read(dsi, ACX424_DCS_READ_ID2, &version, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, "could not read device version byte\n"); + dev_err(acx->dev, "could not read device version byte\n"); return ret; } ret = mipi_dsi_dcs_read(dsi, ACX424_DCS_READ_ID3, &panel, 1); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, "could not read panel ID byte\n"); + dev_err(acx->dev, "could not read panel ID byte\n"); return ret; }
if (vendor == 0x00) { - DRM_DEV_ERROR(acx->dev, "device vendor ID is zero\n"); + dev_err(acx->dev, "device vendor ID is zero\n"); return -ENODEV; }
@@ -220,14 +205,12 @@ static int acx424akp_read_id(struct acx424akp *acx) case DISPLAY_SONY_ACX424AKP_ID1: case DISPLAY_SONY_ACX424AKP_ID2: case DISPLAY_SONY_ACX424AKP_ID3: - DRM_DEV_INFO(acx->dev, - "MTP vendor: %02x, version: %02x, panel: %02x\n", - vendor, version, panel); + dev_info(acx->dev, "MTP vendor: %02x, version: %02x, panel: %02x\n", + vendor, version, panel); break; default: - DRM_DEV_INFO(acx->dev, - "unknown vendor: %02x, version: %02x, panel: %02x\n", - vendor, version, panel); + dev_info(acx->dev, "unknown vendor: %02x, version: %02x, panel: %02x\n", + vendor, version, panel); break; }
@@ -240,7 +223,7 @@ static int acx424akp_power_on(struct acx424akp *acx)
ret = regulator_enable(acx->supply); if (ret) { - DRM_DEV_ERROR(acx->dev, "failed to enable supply (%d)\n", ret); + dev_err(acx->dev, "failed to enable supply (%d)\n", ret); return ret; }
@@ -276,7 +259,7 @@ static int acx424akp_prepare(struct drm_panel *panel)
ret = acx424akp_read_id(acx); if (ret) { - DRM_DEV_ERROR(acx->dev, "failed to read panel ID (%d)\n", ret); + dev_err(acx->dev, "failed to read panel ID (%d)\n", ret); goto err_power_off; }
@@ -284,8 +267,7 @@ static int acx424akp_prepare(struct drm_panel *panel) ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK); if (ret) { - DRM_DEV_ERROR(acx->dev, "failed to enable vblank TE (%d)\n", - ret); + dev_err(acx->dev, "failed to enable vblank TE (%d)\n", ret); goto err_power_off; }
@@ -302,23 +284,21 @@ static int acx424akp_prepare(struct drm_panel *panel) ret = mipi_dsi_dcs_write(dsi, ACX424_DCS_SET_MDDI, &mddi, sizeof(mddi)); if (ret < 0) { - DRM_DEV_ERROR(acx->dev, "failed to set MDDI (%d)\n", ret); + dev_err(acx->dev, "failed to set MDDI (%d)\n", ret); goto err_power_off; }
/* Exit sleep mode */ ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret) { - DRM_DEV_ERROR(acx->dev, "failed to exit sleep mode (%d)\n", - ret); + dev_err(acx->dev, "failed to exit sleep mode (%d)\n", ret); goto err_power_off; } msleep(140);
ret = mipi_dsi_dcs_set_display_on(dsi); if (ret) { - DRM_DEV_ERROR(acx->dev, "failed to turn display on (%d)\n", - ret); + dev_err(acx->dev, "failed to turn display on (%d)\n", ret); goto err_power_off; } if (acx->video_mode) { @@ -351,24 +331,20 @@ static int acx424akp_unprepare(struct drm_panel *panel) ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, &par, 1); if (ret) { - DRM_DEV_ERROR(acx->dev, - "failed to disable display backlight (%d)\n", - ret); + dev_err(acx->dev, "failed to disable display backlight (%d)\n", ret); return ret; }
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret) { - DRM_DEV_ERROR(acx->dev, "failed to turn display off (%d)\n", - ret); + dev_err(acx->dev, "failed to turn display off (%d)\n", ret); return ret; }
/* Enter sleep mode */ ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret) { - DRM_DEV_ERROR(acx->dev, "failed to enter sleep mode (%d)\n", - ret); + dev_err(acx->dev, "failed to enter sleep mode (%d)\n", ret); return ret; } msleep(85); @@ -418,7 +394,7 @@ static int acx424akp_get_modes(struct drm_panel *panel, mode = drm_mode_duplicate(connector->dev, &sony_acx424akp_cmd_mode); if (!mode) { - DRM_ERROR("bad mode or failed to add mode\n"); + dev_err(panel->dev, "bad mode or failed to add mode\n"); return -EINVAL; } drm_mode_set_name(mode); @@ -486,8 +462,7 @@ static int acx424akp_probe(struct mipi_dsi_device *dsi) if (IS_ERR(acx->reset_gpio)) { ret = PTR_ERR(acx->reset_gpio); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, "failed to request GPIO (%d)\n", - ret); + dev_err(dev, "failed to request GPIO (%d)\n", ret); return ret; }
@@ -497,7 +472,7 @@ static int acx424akp_probe(struct mipi_dsi_device *dsi) acx->bl = devm_backlight_device_register(dev, "acx424akp", dev, acx, &acx424akp_bl_ops, NULL); if (IS_ERR(acx->bl)) { - DRM_DEV_ERROR(dev, "failed to register backlight device\n"); + dev_err(dev, "failed to register backlight device\n"); return PTR_ERR(acx->bl); } acx->bl->props.max_brightness = 1023; diff --git a/drivers/gpu/drm/panel/panel-tpo-tpg110.c b/drivers/gpu/drm/panel/panel-tpo-tpg110.c index cd00cfa6ba14..d57ed75a977c 100644 --- a/drivers/gpu/drm/panel/panel-tpo-tpg110.c +++ b/drivers/gpu/drm/panel/panel-tpo-tpg110.c @@ -12,7 +12,6 @@ */ #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#include <linux/bitops.h> #include <linux/delay.h> @@ -238,7 +237,7 @@ static u8 tpg110_readwrite_reg(struct tpg110 *tpg, bool write, spi_message_add_tail(&t[1], &m); ret = spi_sync(tpg->spi, &m); if (ret) { - DRM_DEV_ERROR(tpg->dev, "SPI message error %d\n", ret); + dev_err(tpg->dev, "SPI message error %d\n", ret); return ret; } if (write) @@ -265,18 +264,18 @@ static int tpg110_startup(struct tpg110 *tpg) /* De-assert the reset signal */ gpiod_set_value_cansleep(tpg->grestb, 0); usleep_range(1000, 2000); - DRM_DEV_DEBUG(tpg->dev, "de-asserted GRESTB\n"); + dev_dbg(tpg->dev, "de-asserted GRESTB\n");
/* Test display communication */ tpg110_write_reg(tpg, TPG110_TEST, 0x55); val = tpg110_read_reg(tpg, TPG110_TEST); if (val != 0x55) { - DRM_DEV_ERROR(tpg->dev, "failed communication test\n"); + dev_err(tpg->dev, "failed communication test\n"); return -ENODEV; }
val = tpg110_read_reg(tpg, TPG110_CHIPID); - DRM_DEV_INFO(tpg->dev, "TPG110 chip ID: %d version: %d\n", + dev_info(tpg->dev, "TPG110 chip ID: %d version: %d\n", val >> 4, val & 0x0f);
/* Show display resolution */ @@ -284,27 +283,25 @@ static int tpg110_startup(struct tpg110 *tpg) val &= TPG110_RES_MASK; switch (val) { case TPG110_RES_400X240_D: - DRM_DEV_INFO(tpg->dev, - "IN 400x240 RGB -> OUT 800x480 RGB (dual scan)\n"); + dev_info(tpg->dev, "IN 400x240 RGB -> OUT 800x480 RGB (dual scan)\n"); break; case TPG110_RES_480X272_D: - DRM_DEV_INFO(tpg->dev, - "IN 480x272 RGB -> OUT 800x480 RGB (dual scan)\n"); + dev_info(tpg->dev, "IN 480x272 RGB -> OUT 800x480 RGB (dual scan)\n"); break; case TPG110_RES_480X640: - DRM_DEV_INFO(tpg->dev, "480x640 RGB\n"); + dev_info(tpg->dev, "480x640 RGB\n"); break; case TPG110_RES_480X272: - DRM_DEV_INFO(tpg->dev, "480x272 RGB\n"); + dev_info(tpg->dev, "480x272 RGB\n"); break; case TPG110_RES_640X480: - DRM_DEV_INFO(tpg->dev, "640x480 RGB\n"); + dev_info(tpg->dev, "640x480 RGB\n"); break; case TPG110_RES_800X480: - DRM_DEV_INFO(tpg->dev, "800x480 RGB\n"); + dev_info(tpg->dev, "800x480 RGB\n"); break; default: - DRM_DEV_ERROR(tpg->dev, "ILLEGAL RESOLUTION 0x%02x\n", val); + dev_err(tpg->dev, "ILLEGAL RESOLUTION 0x%02x\n", val); break; }
@@ -322,13 +319,12 @@ static int tpg110_startup(struct tpg110 *tpg) } } if (i == ARRAY_SIZE(tpg110_modes)) { - DRM_DEV_ERROR(tpg->dev, "unsupported mode (%02x) detected\n", - val); + dev_err(tpg->dev, "unsupported mode (%02x) detected\n", val); return -ENODEV; }
val = tpg110_read_reg(tpg, TPG110_CTRL2); - DRM_DEV_INFO(tpg->dev, "resolution and standby is controlled by %s\n", + dev_info(tpg->dev, "resolution and standby is controlled by %s\n", (val & TPG110_CTRL2_RES_PM_CTRL) ? "software" : "hardware"); /* Take control over resolution and standby */ val |= TPG110_CTRL2_RES_PM_CTRL; @@ -414,15 +410,15 @@ static int tpg110_probe(struct spi_device *spi) /* We get the physical display dimensions from the DT */ ret = of_property_read_u32(np, "width-mm", &tpg->width); if (ret) - DRM_DEV_ERROR(dev, "no panel width specified\n"); + dev_err(dev, "no panel width specified\n"); ret = of_property_read_u32(np, "height-mm", &tpg->height); if (ret) - DRM_DEV_ERROR(dev, "no panel height specified\n"); + dev_err(dev, "no panel height specified\n");
/* This asserts the GRESTB signal, putting the display into reset */ tpg->grestb = devm_gpiod_get(dev, "grestb", GPIOD_OUT_HIGH); if (IS_ERR(tpg->grestb)) { - DRM_DEV_ERROR(dev, "no GRESTB GPIO\n"); + dev_err(dev, "no GRESTB GPIO\n"); return -ENODEV; }
@@ -430,7 +426,7 @@ static int tpg110_probe(struct spi_device *spi) spi->mode |= SPI_3WIRE_HIZ; ret = spi_setup(spi); if (ret < 0) { - DRM_DEV_ERROR(dev, "spi setup failed.\n"); + dev_err(dev, "spi setup failed.\n"); return ret; } tpg->spi = spi; diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c index 9b9c167b8dc8..b24b92d93ea5 100644 --- a/drivers/gpu/drm/panel/panel-truly-nt35597.c +++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c @@ -17,7 +17,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
static const char * const regulator_names[] = { "vdda", @@ -231,9 +230,7 @@ static int truly_dcs_write(struct drm_panel *panel, u32 command) for (i = 0; i < ARRAY_SIZE(ctx->dsi); i++) { ret = mipi_dsi_dcs_write(ctx->dsi[i], command, NULL, 0); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "cmd 0x%x failed for dsi = %d\n", - command, i); + dev_err(ctx->dev, "cmd 0x%x failed for dsi = %d\n", command, i); } }
@@ -250,8 +247,7 @@ static int truly_dcs_write_buf(struct drm_panel *panel, for (i = 0; i < ARRAY_SIZE(ctx->dsi); i++) { ret = mipi_dsi_dcs_write_buffer(ctx->dsi[i], buf, size); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "failed to tx cmd [%d], err: %d\n", i, ret); + dev_err(ctx->dev, "failed to tx cmd [%d], err: %d\n", i, ret); return ret; } } @@ -300,16 +296,14 @@ static int truly_nt35597_power_off(struct truly_nt35597 *ctx) ret = regulator_set_load(ctx->supplies[i].consumer, regulator_disable_loads[i]); if (ret) { - DRM_DEV_ERROR(ctx->dev, - "regulator_set_load failed %d\n", ret); + dev_err(ctx->dev, "regulator_set_load failed %d\n", ret); return ret; } }
ret = regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); if (ret) { - DRM_DEV_ERROR(ctx->dev, - "regulator_bulk_disable failed %d\n", ret); + dev_err(ctx->dev, "regulator_bulk_disable failed %d\n", ret); } return ret; } @@ -325,8 +319,7 @@ static int truly_nt35597_disable(struct drm_panel *panel) if (ctx->backlight) { ret = backlight_disable(ctx->backlight); if (ret < 0) - DRM_DEV_ERROR(ctx->dev, "backlight disable failed %d\n", - ret); + dev_err(ctx->dev, "backlight disable failed %d\n", ret); }
ctx->enabled = false; @@ -346,9 +339,7 @@ static int truly_nt35597_unprepare(struct drm_panel *panel)
ret = truly_dcs_write(panel, MIPI_DCS_SET_DISPLAY_OFF); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "set_display_off cmd failed ret = %d\n", - ret); + dev_err(ctx->dev, "set_display_off cmd failed ret = %d\n", ret); }
/* 120ms delay required here as per DCS spec */ @@ -356,13 +347,12 @@ static int truly_nt35597_unprepare(struct drm_panel *panel)
ret = truly_dcs_write(panel, MIPI_DCS_ENTER_SLEEP_MODE); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "enter_sleep cmd failed ret = %d\n", ret); + dev_err(ctx->dev, "enter_sleep cmd failed ret = %d\n", ret); }
ret = truly_nt35597_power_off(ctx); if (ret < 0) - DRM_DEV_ERROR(ctx->dev, "power_off failed ret = %d\n", ret); + dev_err(ctx->dev, "power_off failed ret = %d\n", ret);
ctx->prepared = false; return ret; @@ -396,18 +386,14 @@ static int truly_nt35597_prepare(struct drm_panel *panel) panel_on_cmds[i].size, panel_on_cmds[i].commands); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "cmd set tx failed i = %d ret = %d\n", - i, ret); + dev_err(ctx->dev, "cmd set tx failed i = %d ret = %d\n", i, ret); goto power_off; } }
ret = truly_dcs_write(panel, MIPI_DCS_EXIT_SLEEP_MODE); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "exit_sleep_mode cmd failed ret = %d\n", - ret); + dev_err(ctx->dev, "exit_sleep_mode cmd failed ret = %d\n", ret); goto power_off; }
@@ -416,8 +402,7 @@ static int truly_nt35597_prepare(struct drm_panel *panel)
ret = truly_dcs_write(panel, MIPI_DCS_SET_DISPLAY_ON); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "set_display_on cmd failed ret = %d\n", ret); + dev_err(ctx->dev, "set_display_on cmd failed ret = %d\n", ret); goto power_off; }
@@ -430,7 +415,7 @@ static int truly_nt35597_prepare(struct drm_panel *panel)
power_off: if (truly_nt35597_power_off(ctx)) - DRM_DEV_ERROR(ctx->dev, "power_off failed\n"); + dev_err(ctx->dev, "power_off failed\n"); return ret; }
@@ -445,8 +430,7 @@ static int truly_nt35597_enable(struct drm_panel *panel) if (ctx->backlight) { ret = backlight_enable(ctx->backlight); if (ret < 0) - DRM_DEV_ERROR(ctx->dev, "backlight enable failed %d\n", - ret); + dev_err(ctx->dev, "backlight enable failed %d\n", ret); }
ctx->enabled = true; @@ -464,8 +448,7 @@ static int truly_nt35597_get_modes(struct drm_panel *panel, config = ctx->config; mode = drm_mode_create(connector->dev); if (!mode) { - DRM_DEV_ERROR(ctx->dev, - "failed to create a new display mode\n"); + dev_err(ctx->dev, "failed to create a new display mode\n"); return 0; }
@@ -501,15 +484,13 @@ static int truly_nt35597_panel_add(struct truly_nt35597 *ctx)
ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - DRM_DEV_ERROR(dev, "cannot get reset gpio %ld\n", - PTR_ERR(ctx->reset_gpio)); + dev_err(dev, "cannot get reset gpio %ld\n", PTR_ERR(ctx->reset_gpio)); return PTR_ERR(ctx->reset_gpio); }
ctx->mode_gpio = devm_gpiod_get(dev, "mode", GPIOD_OUT_LOW); if (IS_ERR(ctx->mode_gpio)) { - DRM_DEV_ERROR(dev, "cannot get mode gpio %ld\n", - PTR_ERR(ctx->mode_gpio)); + dev_err(dev, "cannot get mode gpio %ld\n", PTR_ERR(ctx->mode_gpio)); return PTR_ERR(ctx->mode_gpio); }
@@ -584,22 +565,21 @@ static int truly_nt35597_probe(struct mipi_dsi_device *dsi)
dsi1 = of_graph_get_remote_node(dsi->dev.of_node, 1, -1); if (!dsi1) { - DRM_DEV_ERROR(dev, - "failed to get remote node for dsi1_device\n"); + dev_err(dev, "failed to get remote node for dsi1_device\n"); return -ENODEV; }
dsi1_host = of_find_mipi_dsi_host_by_node(dsi1); of_node_put(dsi1); if (!dsi1_host) { - DRM_DEV_ERROR(dev, "failed to find dsi host\n"); + dev_err(dev, "failed to find dsi host\n"); return -EPROBE_DEFER; }
/* register the second DSI device */ dsi1_device = mipi_dsi_device_register_full(dsi1_host, &info); if (IS_ERR(dsi1_device)) { - DRM_DEV_ERROR(dev, "failed to create dsi device\n"); + dev_err(dev, "failed to create dsi device\n"); return PTR_ERR(dsi1_device); }
@@ -611,7 +591,7 @@ static int truly_nt35597_probe(struct mipi_dsi_device *dsi)
ret = truly_nt35597_panel_add(ctx); if (ret) { - DRM_DEV_ERROR(dev, "failed to add panel\n"); + dev_err(dev, "failed to add panel\n"); goto err_panel_add; }
@@ -623,8 +603,7 @@ static int truly_nt35597_probe(struct mipi_dsi_device *dsi) MIPI_DSI_CLOCK_NON_CONTINUOUS; ret = mipi_dsi_attach(dsi_dev); if (ret < 0) { - DRM_DEV_ERROR(dev, - "dsi attach failed i = %d\n", i); + dev_err(dev, "dsi attach failed i = %d\n", i); goto err_dsi_attach; } } diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c index a12976b497ce..eb43503ec97b 100644 --- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c @@ -14,7 +14,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
struct visionox_rm69299 { struct drm_panel panel; @@ -69,16 +68,14 @@ static int visionox_rm69299_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_write(ctx->dsi, MIPI_DCS_SET_DISPLAY_OFF, NULL, 0); if (ret < 0) - DRM_DEV_ERROR(ctx->panel.dev, - "set_display_off cmd failed ret = %d\n", ret); + dev_err(ctx->panel.dev, "set_display_off cmd failed ret = %d\n", ret);
/* 120ms delay required here as per DCS spec */ msleep(120);
ret = mipi_dsi_dcs_write(ctx->dsi, MIPI_DCS_ENTER_SLEEP_MODE, NULL, 0); if (ret < 0) { - DRM_DEV_ERROR(ctx->panel.dev, - "enter_sleep cmd failed ret = %d\n", ret); + dev_err(ctx->panel.dev, "enter_sleep cmd failed ret = %d\n", ret); }
ret = visionox_rm69299_power_off(ctx); @@ -103,36 +100,31 @@ static int visionox_rm69299_prepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_write_buffer(ctx->dsi, (u8[]) { 0xfe, 0x00 }, 2); if (ret < 0) { - DRM_DEV_ERROR(ctx->panel.dev, - "cmd set tx 0 failed, ret = %d\n", ret); + dev_err(ctx->panel.dev, "cmd set tx 0 failed, ret = %d\n", ret); goto power_off; }
ret = mipi_dsi_dcs_write_buffer(ctx->dsi, (u8[]) { 0xc2, 0x08 }, 2); if (ret < 0) { - DRM_DEV_ERROR(ctx->panel.dev, - "cmd set tx 1 failed, ret = %d\n", ret); + dev_err(ctx->panel.dev, "cmd set tx 1 failed, ret = %d\n", ret); goto power_off; }
ret = mipi_dsi_dcs_write_buffer(ctx->dsi, (u8[]) { 0x35, 0x00 }, 2); if (ret < 0) { - DRM_DEV_ERROR(ctx->panel.dev, - "cmd set tx 2 failed, ret = %d\n", ret); + dev_err(ctx->panel.dev, "cmd set tx 2 failed, ret = %d\n", ret); goto power_off; }
ret = mipi_dsi_dcs_write_buffer(ctx->dsi, (u8[]) { 0x51, 0xff }, 2); if (ret < 0) { - DRM_DEV_ERROR(ctx->panel.dev, - "cmd set tx 3 failed, ret = %d\n", ret); + dev_err(ctx->panel.dev, "cmd set tx 3 failed, ret = %d\n", ret); goto power_off; }
ret = mipi_dsi_dcs_write(ctx->dsi, MIPI_DCS_EXIT_SLEEP_MODE, NULL, 0); if (ret < 0) { - DRM_DEV_ERROR(ctx->panel.dev, - "exit_sleep_mode cmd failed ret = %d\n", ret); + dev_err(ctx->panel.dev, "exit_sleep_mode cmd failed ret = %d\n", ret); goto power_off; }
@@ -141,8 +133,7 @@ static int visionox_rm69299_prepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_write(ctx->dsi, MIPI_DCS_SET_DISPLAY_ON, NULL, 0); if (ret < 0) { - DRM_DEV_ERROR(ctx->panel.dev, - "set_display_on cmd failed ret = %d\n", ret); + dev_err(ctx->panel.dev, "set_display_on cmd failed ret = %d\n", ret); goto power_off; }
@@ -179,8 +170,7 @@ static int visionox_rm69299_get_modes(struct drm_panel *panel,
mode = drm_mode_create(connector->dev); if (!mode) { - DRM_DEV_ERROR(ctx->panel.dev, - "failed to create a new display mode\n"); + dev_err(ctx->panel.dev, "failed to create a new display mode\n"); return 0; }
@@ -225,8 +215,7 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi) ctx->reset_gpio = devm_gpiod_get(ctx->panel.dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - DRM_DEV_ERROR(dev, "cannot get reset gpio %ld\n", - PTR_ERR(ctx->reset_gpio)); + dev_err(dev, "cannot get reset gpio %ld\n", PTR_ERR(ctx->reset_gpio)); return PTR_ERR(ctx->reset_gpio); }
@@ -242,23 +231,19 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi) MIPI_DSI_CLOCK_NON_CONTINUOUS; ret = mipi_dsi_attach(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "dsi attach failed ret = %d\n", ret); + dev_err(dev, "dsi attach failed ret = %d\n", ret); goto err_dsi_attach; }
ret = regulator_set_load(ctx->supplies[0].consumer, 32000); if (ret) { - DRM_DEV_ERROR(dev, - "regulator set load failed for vdda supply ret = %d\n", - ret); + dev_err(dev, "regulator set load failed for vdda supply ret = %d\n", ret); goto err_set_load; }
ret = regulator_set_load(ctx->supplies[1].consumer, 13200); if (ret) { - DRM_DEV_ERROR(dev, - "regulator set load failed for vdd3p3 supply ret = %d\n", - ret); + dev_err(dev, "regulator set load failed for vdd3p3 supply ret = %d\n", ret); goto err_set_load; }
diff --git a/drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c b/drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c index 06341deb60ca..55172d63a922 100644 --- a/drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c +++ b/drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c @@ -12,7 +12,6 @@ #include <drm/drm_mipi_dsi.h> #include <drm/drm_modes.h> #include <drm/drm_panel.h> -#include <drm/drm_print.h>
#include <video/display_timing.h> #include <video/mipi_display.h> @@ -135,7 +134,7 @@ static int xpp055c272_init_sequence(struct xpp055c272 *ctx)
msleep(60);
- DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n"); + dev_dbg(dev, "Panel init sequence done\n"); return 0; }
@@ -150,13 +149,11 @@ static int xpp055c272_unprepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); if (ret < 0) - DRM_DEV_ERROR(ctx->dev, "failed to set display off: %d\n", - ret); + dev_err(ctx->dev, "failed to set display off: %d\n", ret);
mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "failed to enter sleep mode: %d\n", - ret); + dev_err(ctx->dev, "failed to enter sleep mode: %d\n", ret); return ret; }
@@ -177,17 +174,15 @@ static int xpp055c272_prepare(struct drm_panel *panel) if (ctx->prepared) return 0;
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n"); + dev_dbg(ctx->dev, "Resetting the panel\n"); ret = regulator_enable(ctx->vci); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable vci supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable vci supply: %d\n", ret); return ret; } ret = regulator_enable(ctx->iovcc); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, - "Failed to enable iovcc supply: %d\n", ret); + dev_err(ctx->dev, "Failed to enable iovcc supply: %d\n", ret); goto disable_vci; }
@@ -201,14 +196,13 @@ static int xpp055c272_prepare(struct drm_panel *panel)
ret = xpp055c272_init_sequence(ctx); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n", - ret); + dev_err(ctx->dev, "Panel init sequence failed: %d\n", ret); goto disable_iovcc; }
ret = mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Failed to exit sleep mode: %d\n", ret); + dev_err(ctx->dev, "Failed to exit sleep mode: %d\n", ret); goto disable_iovcc; }
@@ -217,7 +211,7 @@ static int xpp055c272_prepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_on(dsi); if (ret < 0) { - DRM_DEV_ERROR(ctx->dev, "Failed to set display on: %d\n", ret); + dev_err(ctx->dev, "Failed to set display on: %d\n", ret); goto disable_iovcc; }
@@ -256,9 +250,9 @@ static int xpp055c272_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); if (!mode) { - DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(ctx->dev, "Failed to add mode %ux%u@%u\n", + default_mode.hdisplay, default_mode.vdisplay, + drm_mode_vrefresh(&default_mode)); return -ENOMEM; }
@@ -290,7 +284,7 @@ static int xpp055c272_probe(struct mipi_dsi_device *dsi)
ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); + dev_err(dev, "cannot get reset gpio\n"); return PTR_ERR(ctx->reset_gpio); }
@@ -298,9 +292,7 @@ static int xpp055c272_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->vci)) { ret = PTR_ERR(ctx->vci); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request vci regulator: %d\n", - ret); + dev_err(dev, "Failed to request vci regulator: %d\n", ret); return ret; }
@@ -308,9 +300,7 @@ static int xpp055c272_probe(struct mipi_dsi_device *dsi) if (IS_ERR(ctx->iovcc)) { ret = PTR_ERR(ctx->iovcc); if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, - "Failed to request iovcc regulator: %d\n", - ret); + dev_err(dev, "Failed to request iovcc regulator: %d\n", ret); return ret; }
@@ -334,7 +324,7 @@ static int xpp055c272_probe(struct mipi_dsi_device *dsi)
ret = mipi_dsi_attach(dsi); if (ret < 0) { - DRM_DEV_ERROR(dev, "mipi_dsi_attach failed: %d\n", ret); + dev_err(dev, "mipi_dsi_attach failed: %d\n", ret); drm_panel_remove(&ctx->panel); return ret; } @@ -349,13 +339,11 @@ static void xpp055c272_shutdown(struct mipi_dsi_device *dsi)
ret = drm_panel_unprepare(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret);
ret = drm_panel_disable(&ctx->panel); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to disable panel: %d\n", - ret); + dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); }
static int xpp055c272_remove(struct mipi_dsi_device *dsi) @@ -367,8 +355,7 @@ static int xpp055c272_remove(struct mipi_dsi_device *dsi)
ret = mipi_dsi_detach(dsi); if (ret < 0) - DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n", - ret); + dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
drm_panel_remove(&ctx->panel);
Hi, On Sat, Aug 15, 2020 at 02:54:01PM +0200, Sam Ravnborg wrote:
The drm/panel drivers uses a mixture of DRM_ and dev_ based logging. With this patchset all panel drivers are migrated to use dev_ based logging as the DRM_ based logging did not add any extra info.
Drop the now unused include of drm_print.h.
With this change new panel drivers will be requires to change to dev_ based logging - so some of the in-flight panel drivers will need trivial updates before they are accepted.
Patch divided in smaller bites to ease review. There is no dependencies between the patches.
Copied a few people that may have input to the move away from DRM_ based logging (Daniel (presumeably on vacation), Jani).
Looks good to me and after applying to next-20200824 i couldn't spot any DRM_ style logging leftovers:
Reviewed-by: Guido Günther agx@sigxcpu.org
Cheers, -- Guido
Sam
Sam Ravnborg (5): drm/panel: samsung: Use dev_ based logging drm/panel: leadtek: Use dev_ based logging drm/panel: raydium: Use dev_ based logging drm/panel: sitronix: Use dev_ based logging drm/panel: Use dev_ based logging
drivers/gpu/drm/panel/panel-boe-himax8279d.c | 44 ++++-------- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 51 +++++--------- drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c | 19 +++-- .../gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 21 +++--- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 3 +- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 31 +++------ drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 33 ++++----- drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 58 ++++++---------- drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c | 49 +++++-------- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 40 ++++------- drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 13 ++-- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 33 ++++----- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 18 +++-- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 16 ++--- drivers/gpu/drm/panel/panel-samsung-ld9040.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 23 +++--- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 22 +++--- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 3 +- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 10 ++- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 61 ++++++---------- drivers/gpu/drm/panel/panel-sony-acx424akp.c | 81 ++++++++-------------- drivers/gpu/drm/panel/panel-tpo-tpg110.c | 38 +++++----- drivers/gpu/drm/panel/panel-truly-nt35597.c | 63 ++++++----------- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 41 ++++------- drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c | 51 +++++--------- 27 files changed, 308 insertions(+), 523 deletions(-)
On Sat, Aug 15, 2020 at 02:54:01PM +0200, Sam Ravnborg wrote:
The drm/panel drivers uses a mixture of DRM_ and dev_ based logging. With this patchset all panel drivers are migrated to use dev_ based logging as the DRM_ based logging did not add any extra info.
Drop the now unused include of drm_print.h.
With this change new panel drivers will be requires to change to dev_ based logging - so some of the in-flight panel drivers will need trivial updates before they are accepted.
Patch divided in smaller bites to ease review. There is no dependencies between the patches.
Copied a few people that may have input to the move away from DRM_ based logging (Daniel (presumeably on vacation), Jani).
Sam
Sam Ravnborg (5): drm/panel: samsung: Use dev_ based logging drm/panel: leadtek: Use dev_ based logging drm/panel: raydium: Use dev_ based logging drm/panel: sitronix: Use dev_ based logging drm/panel: Use dev_ based logging
Thanks for the reviews from Linus and Guido. Series is now applied to drm-misc-next.
Sam
drivers/gpu/drm/panel/panel-boe-himax8279d.c | 44 ++++-------- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 51 +++++--------- drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c | 19 +++-- .../gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 21 +++--- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 3 +- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 31 +++------ drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 33 ++++----- drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 58 ++++++---------- drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c | 49 +++++-------- drivers/gpu/drm/panel/panel-novatek-nt35510.c | 40 ++++------- drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 13 ++-- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 33 ++++----- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 18 +++-- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 16 ++--- drivers/gpu/drm/panel/panel-samsung-ld9040.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 23 +++--- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 22 +++--- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 3 +- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 10 ++- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 61 ++++++---------- drivers/gpu/drm/panel/panel-sony-acx424akp.c | 81 ++++++++-------------- drivers/gpu/drm/panel/panel-tpo-tpg110.c | 38 +++++----- drivers/gpu/drm/panel/panel-truly-nt35597.c | 63 ++++++----------- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 41 ++++------- drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c | 51 +++++--------- 27 files changed, 308 insertions(+), 523 deletions(-)
dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
dri-devel@lists.freedesktop.org