Commit 5936b3bd authored by Sam Ravnborg's avatar Sam Ravnborg

drm/panel: samsung: Use dev_ based logging

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: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarGuido Günther <agx@sigxcpu.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>
Link: https://patchwork.freedesktop.org/patch/msgid/20200815125406.1153224-2-sam@ravnborg.org
parent 72967d56
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <drm/drm_modes.h> #include <drm/drm_modes.h>
#include <drm/drm_panel.h> #include <drm/drm_panel.h>
#include <drm/drm_print.h>
/* Manufacturer Command Set */ /* Manufacturer Command Set */
#define MCS_MANPWR 0xb0 #define MCS_MANPWR 0xb0
...@@ -269,7 +268,7 @@ static int ld9040_get_modes(struct drm_panel *panel, ...@@ -269,7 +268,7 @@ static int ld9040_get_modes(struct drm_panel *panel,
mode = drm_mode_create(connector->dev); mode = drm_mode_create(connector->dev);
if (!mode) { 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; return 0;
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <drm/drm_modes.h> #include <drm/drm_modes.h>
#include <drm/drm_mipi_dsi.h> #include <drm/drm_mipi_dsi.h>
#include <drm/drm_panel.h> #include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
...@@ -55,8 +54,7 @@ static int s6d16d0_unprepare(struct drm_panel *panel) ...@@ -55,8 +54,7 @@ static int s6d16d0_unprepare(struct drm_panel *panel)
/* Enter sleep mode */ /* Enter sleep mode */
ret = mipi_dsi_dcs_enter_sleep_mode(dsi); ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
if (ret) { if (ret) {
DRM_DEV_ERROR(s6->dev, "failed to enter sleep mode (%d)\n", dev_err(s6->dev, "failed to enter sleep mode (%d)\n", ret);
ret);
return ret; return ret;
} }
...@@ -75,7 +73,7 @@ static int s6d16d0_prepare(struct drm_panel *panel) ...@@ -75,7 +73,7 @@ static int s6d16d0_prepare(struct drm_panel *panel)
ret = regulator_enable(s6->supply); ret = regulator_enable(s6->supply);
if (ret) { 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; return ret;
} }
...@@ -90,15 +88,13 @@ static int s6d16d0_prepare(struct drm_panel *panel) ...@@ -90,15 +88,13 @@ static int s6d16d0_prepare(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_tear_on(dsi, ret = mipi_dsi_dcs_set_tear_on(dsi,
MIPI_DSI_DCS_TEAR_MODE_VBLANK); MIPI_DSI_DCS_TEAR_MODE_VBLANK);
if (ret) { if (ret) {
DRM_DEV_ERROR(s6->dev, "failed to enable vblank TE (%d)\n", dev_err(s6->dev, "failed to enable vblank TE (%d)\n", ret);
ret);
return ret; return ret;
} }
/* Exit sleep mode and power on */ /* Exit sleep mode and power on */
ret = mipi_dsi_dcs_exit_sleep_mode(dsi); ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
if (ret) { if (ret) {
DRM_DEV_ERROR(s6->dev, "failed to exit sleep mode (%d)\n", dev_err(s6->dev, "failed to exit sleep mode (%d)\n", ret);
ret);
return ret; return ret;
} }
...@@ -113,8 +109,7 @@ static int s6d16d0_enable(struct drm_panel *panel) ...@@ -113,8 +109,7 @@ static int s6d16d0_enable(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_on(dsi); ret = mipi_dsi_dcs_set_display_on(dsi);
if (ret) { if (ret) {
DRM_DEV_ERROR(s6->dev, "failed to turn display on (%d)\n", dev_err(s6->dev, "failed to turn display on (%d)\n", ret);
ret);
return ret; return ret;
} }
...@@ -129,8 +124,7 @@ static int s6d16d0_disable(struct drm_panel *panel) ...@@ -129,8 +124,7 @@ static int s6d16d0_disable(struct drm_panel *panel)
ret = mipi_dsi_dcs_set_display_off(dsi); ret = mipi_dsi_dcs_set_display_off(dsi);
if (ret) { if (ret) {
DRM_DEV_ERROR(s6->dev, "failed to turn display off (%d)\n", dev_err(s6->dev, "failed to turn display off (%d)\n", ret);
ret);
return ret; return ret;
} }
...@@ -144,7 +138,7 @@ static int s6d16d0_get_modes(struct drm_panel *panel, ...@@ -144,7 +138,7 @@ static int s6d16d0_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &samsung_s6d16d0_mode); mode = drm_mode_duplicate(connector->dev, &samsung_s6d16d0_mode);
if (!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; return -EINVAL;
} }
drm_mode_set_name(mode); drm_mode_set_name(mode);
...@@ -204,8 +198,7 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi) ...@@ -204,8 +198,7 @@ static int s6d16d0_probe(struct mipi_dsi_device *dsi)
if (IS_ERR(s6->reset_gpio)) { if (IS_ERR(s6->reset_gpio)) {
ret = PTR_ERR(s6->reset_gpio); ret = PTR_ERR(s6->reset_gpio);
if (ret != -EPROBE_DEFER) if (ret != -EPROBE_DEFER)
DRM_DEV_ERROR(dev, "failed to request GPIO (%d)\n", dev_err(dev, "failed to request GPIO (%d)\n", ret);
ret);
return ret; return ret;
} }
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <drm/drm_mipi_dsi.h> #include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h> #include <drm/drm_modes.h>
#include <drm/drm_panel.h> #include <drm/drm_panel.h>
#include <drm/drm_print.h>
#define S6E3HA2_MIN_BRIGHTNESS 0 #define S6E3HA2_MIN_BRIGHTNESS 0
#define S6E3HA2_MAX_BRIGHTNESS 100 #define S6E3HA2_MAX_BRIGHTNESS 100
...@@ -651,7 +650,7 @@ static int s6e3ha2_get_modes(struct drm_panel *panel, ...@@ -651,7 +650,7 @@ static int s6e3ha2_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, ctx->desc->mode); mode = drm_mode_duplicate(connector->dev, ctx->desc->mode);
if (!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, ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay,
drm_mode_vrefresh(ctx->desc->mode)); drm_mode_vrefresh(ctx->desc->mode));
return -ENOMEM; return -ENOMEM;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <drm/drm_mipi_dsi.h> #include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h> #include <drm/drm_modes.h>
#include <drm/drm_panel.h> #include <drm/drm_panel.h>
#include <drm/drm_print.h>
#define MCS_LEVEL2_KEY 0xf0 #define MCS_LEVEL2_KEY 0xf0
#define MCS_MTP_KEY 0xf1 #define MCS_MTP_KEY 0xf1
...@@ -406,7 +405,7 @@ static int s6e63j0x03_get_modes(struct drm_panel *panel, ...@@ -406,7 +405,7 @@ static int s6e63j0x03_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); mode = drm_mode_duplicate(connector->dev, &default_mode);
if (!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, default_mode.hdisplay, default_mode.vdisplay,
drm_mode_vrefresh(&default_mode)); drm_mode_vrefresh(&default_mode));
return -ENOMEM; return -ENOMEM;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <drm/drm_modes.h> #include <drm/drm_modes.h>
#include <drm/drm_panel.h> #include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <linux/backlight.h> #include <linux/backlight.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -157,7 +156,7 @@ static void s6e63m0_dcs_write(struct s6e63m0 *ctx, const u8 *data, size_t len) ...@@ -157,7 +156,7 @@ static void s6e63m0_dcs_write(struct s6e63m0 *ctx, const u8 *data, size_t len)
if (ctx->error < 0 || len == 0) if (ctx->error < 0 || len == 0)
return; 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); ret = s6e63m0_spi_write_word(ctx, *data);
while (!ret && --len) { while (!ret && --len) {
...@@ -166,8 +165,7 @@ static void s6e63m0_dcs_write(struct s6e63m0 *ctx, const u8 *data, size_t len) ...@@ -166,8 +165,7 @@ static void s6e63m0_dcs_write(struct s6e63m0 *ctx, const u8 *data, size_t len)
} }
if (ret) { if (ret) {
DRM_DEV_ERROR(ctx->dev, "error %d writing dcs seq: %*ph\n", ret, dev_err(ctx->dev, "error %d writing dcs seq: %*ph\n", ret, (int)len, data);
(int)len, data);
ctx->error = ret; ctx->error = ret;
} }
...@@ -368,9 +366,9 @@ static int s6e63m0_get_modes(struct drm_panel *panel, ...@@ -368,9 +366,9 @@ static int s6e63m0_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, &default_mode); mode = drm_mode_duplicate(connector->dev, &default_mode);
if (!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, default_mode.hdisplay, default_mode.vdisplay,
drm_mode_vrefresh(&default_mode)); drm_mode_vrefresh(&default_mode));
return -ENOMEM; return -ENOMEM;
} }
...@@ -425,8 +423,7 @@ static int s6e63m0_backlight_register(struct s6e63m0 *ctx) ...@@ -425,8 +423,7 @@ static int s6e63m0_backlight_register(struct s6e63m0 *ctx)
&props); &props);
if (IS_ERR(ctx->bl_dev)) { if (IS_ERR(ctx->bl_dev)) {
ret = PTR_ERR(ctx->bl_dev); ret = PTR_ERR(ctx->bl_dev);
DRM_DEV_ERROR(dev, "error registering backlight device (%d)\n", dev_err(dev, "error registering backlight device (%d)\n", ret);
ret);
} }
return ret; return ret;
...@@ -453,14 +450,13 @@ static int s6e63m0_probe(struct spi_device *spi) ...@@ -453,14 +450,13 @@ static int s6e63m0_probe(struct spi_device *spi)
ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies),
ctx->supplies); ctx->supplies);
if (ret < 0) { 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; return ret;
} }
ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(ctx->reset_gpio)) { if (IS_ERR(ctx->reset_gpio)) {
DRM_DEV_ERROR(dev, "cannot get reset-gpios %ld\n", dev_err(dev, "cannot get reset-gpios %ld\n", PTR_ERR(ctx->reset_gpio));
PTR_ERR(ctx->reset_gpio));
return PTR_ERR(ctx->reset_gpio); return PTR_ERR(ctx->reset_gpio);
} }
...@@ -468,7 +464,7 @@ static int s6e63m0_probe(struct spi_device *spi) ...@@ -468,7 +464,7 @@ static int s6e63m0_probe(struct spi_device *spi)
spi->mode = SPI_MODE_3; spi->mode = SPI_MODE_3;
ret = spi_setup(spi); ret = spi_setup(spi);
if (ret < 0) { if (ret < 0) {
DRM_DEV_ERROR(dev, "spi setup failed.\n"); dev_err(dev, "spi setup failed.\n");
return ret; return ret;
} }
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <drm/drm_mipi_dsi.h> #include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h> #include <drm/drm_modes.h>
#include <drm/drm_panel.h> #include <drm/drm_panel.h>
#include <drm/drm_print.h>
#define LDI_MTP_LENGTH 24 #define LDI_MTP_LENGTH 24
#define GAMMA_LEVEL_NUM 25 #define GAMMA_LEVEL_NUM 25
...@@ -928,7 +927,7 @@ static int s6e8aa0_get_modes(struct drm_panel *panel, ...@@ -928,7 +927,7 @@ static int s6e8aa0_get_modes(struct drm_panel *panel,
mode = drm_mode_create(connector->dev); mode = drm_mode_create(connector->dev);
if (!mode) { 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment