From: Sam Ravnborg <sam@ravnborg.org>
To: Thierry Reding <thierry.reding@gmail.com>,
dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Linus Walleij <linus.walleij@linaro.org>,
Stefan Mavrodiev <stefan@olimex.com>,
linux-kernel@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH v1 10/19] drm/panel: lg: use DRM_DEV*
Date: Thu, 31 Jan 2019 20:26:10 +0100 [thread overview]
Message-ID: <20190131192619.9763-11-sam@ravnborg.org> (raw)
In-Reply-To: <20190131192619.9763-1-sam@ravnborg.org>
Introduce use of DRM_DEV* for logging.
This makes logging in the drm subsystem more consistent.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
drivers/gpu/drm/panel/panel-lg-lg4573.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-lg-lg4573.c b/drivers/gpu/drm/panel/panel-lg-lg4573.c
index e63fba2761f4..9bbf6dde6b7d 100644
--- a/drivers/gpu/drm/panel/panel-lg-lg4573.c
+++ b/drivers/gpu/drm/panel/panel-lg-lg4573.c
@@ -18,6 +18,7 @@
#include <drm/drm_device.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>
+#include <drm/drm_print.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
@@ -48,7 +49,7 @@ static int lg4573_spi_write_u16(struct lg4573 *ctx, u16 data)
u16 temp = cpu_to_be16(data);
struct spi_message msg;
- dev_dbg(ctx->panel.dev, "writing data: %x\n", data);
+ DRM_DEV_DEBUG(ctx->panel.dev, "writing data: %x\n", data);
xfer.tx_buf = &temp;
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
@@ -115,7 +116,7 @@ static int lg4573_display_mode_settings(struct lg4573 *ctx)
0x7206, 0x720C, 0x7200, 0x7200,
};
- dev_dbg(ctx->panel.dev, "transfer display mode settings\n");
+ DRM_DEV_DEBUG(ctx->panel.dev, "transfer display mode settings\n");
return lg4573_spi_write_u16_array(ctx, display_mode_settings,
ARRAY_SIZE(display_mode_settings));
}
@@ -131,7 +132,7 @@ static int lg4573_power_settings(struct lg4573 *ctx)
0x7263,
};
- dev_dbg(ctx->panel.dev, "transfer power settings\n");
+ DRM_DEV_DEBUG(ctx->panel.dev, "transfer power settings\n");
return lg4573_spi_write_u16_array(ctx, power_settings,
ARRAY_SIZE(power_settings));
}
@@ -156,7 +157,7 @@ static int lg4573_gamma_settings(struct lg4573 *ctx)
0x7201, 0x7220, 0x7200, 0x7203,
};
- dev_dbg(ctx->panel.dev, "transfer gamma settings\n");
+ DRM_DEV_DEBUG(ctx->panel.dev, "transfer gamma settings\n");
return lg4573_spi_write_u16_array(ctx, gamma_settings,
ARRAY_SIZE(gamma_settings));
}
@@ -165,7 +166,7 @@ static int lg4573_init(struct lg4573 *ctx)
{
int ret;
- dev_dbg(ctx->panel.dev, "initializing LCD\n");
+ DRM_DEV_DEBUG(ctx->panel.dev, "initializing LCD\n");
ret = lg4573_display_mode_settings(ctx);
if (ret)
@@ -219,9 +220,10 @@ static int lg4573_get_modes(struct drm_panel *panel)
mode = drm_mode_duplicate(panel->drm, &default_mode);
if (!mode) {
- dev_err(panel->drm->dev, "failed to add mode %ux%ux@%u\n",
- default_mode.hdisplay, default_mode.vdisplay,
- default_mode.vrefresh);
+ DRM_DEV_ERROR(panel->drm->dev,
+ "failed to add mode %ux%ux@%u\n",
+ default_mode.hdisplay, default_mode.vdisplay,
+ default_mode.vrefresh);
return -ENOMEM;
}
@@ -258,7 +260,7 @@ static int lg4573_probe(struct spi_device *spi)
ret = spi_setup(spi);
if (ret < 0) {
- dev_err(&spi->dev, "SPI setup failed: %d\n", ret);
+ DRM_DEV_ERROR(&spi->dev, "SPI setup failed: %d\n", ret);
return ret;
}
--
2.12.0
next prev parent reply other threads:[~2019-01-31 19:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 19:26 [PATCH v1 0/19] drm/panel: drmP.h removal and DRM_DEV* Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 01/19] drm/panel: drop drmP.h usage Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 02/19] drm/panel: panel-innolux: drop unused variable Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 03/19] drm/panel: samsung: use DRM_DEV* Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 04/19] drm/panel: arm-versatile: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 05/19] drm/panel: truly: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 06/19] drm/panel: sitronix: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 07/19] drm/panel: ilitek: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 08/19] drm/panel: innolux: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 09/19] drm/panel: jdi: " Sam Ravnborg
2019-01-31 19:26 ` Sam Ravnborg [this message]
2019-01-31 19:26 ` [PATCH v1 11/19] drm/panel: lvds: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 12/19] drm/panel: olimex: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 13/19] drm/panel: orisetech: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 14/19] drm/panel: panasonic: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 15/19] drm/panel: raspberrypi: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 16/19] drm/panel: raydium: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 17/19] drm/panel: seiko: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 18/19] drm/panel: sharp: " Sam Ravnborg
2019-01-31 19:26 ` [PATCH v1 19/19] drm/panel: simple: " Sam Ravnborg
2019-01-31 19:33 ` [PATCH v1 0/19] drm/panel: drmP.h removal and DRM_DEV* Sam Ravnborg
2019-01-31 20:07 ` Sean Paul
2019-01-31 21:03 ` Sam Ravnborg
2019-01-31 21:54 ` Thierry Reding
2019-02-01 9:20 ` Sam Ravnborg
2019-02-01 10:30 ` Jani Nikula
2019-02-01 10:52 ` Andrzej Hajda
2019-02-01 11:13 ` Jani Nikula
2019-02-01 13:37 ` Sam Ravnborg
2019-02-02 1:31 ` Joe Perches
2019-02-04 18:42 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190131192619.9763-11-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stefan@olimex.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome