Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp11368ima; Thu, 31 Jan 2019 11:32:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN5rRGcnrbo0iUNaLAaskKKWPWsJOC15DxCdXnNnj76XTkBnDF22WXZBKkyXmuaYCSCrnJkM X-Received: by 2002:a17:902:6502:: with SMTP id b2mr35552632plk.44.1548963137202; Thu, 31 Jan 2019 11:32:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548963137; cv=none; d=google.com; s=arc-20160816; b=H7hGhCMKG7ULLxALtRMGgSNAtGYijOTOwsfaOjRs+VFY3mhHtNWzCJ/0Ra2/PYPCkk qrrrIAkpIith5mu4J2q/gDkJ2n2B8WyKXW4lye0THN1H/E0S9ixrdcZ9Cc8XwnHazDk+ plOMhKtOSawHb7RJD740j4V+C0M73asLtseOHN1+1w4I8NaJCDZqMyKE58uqZS+euB9a n1j+0G89fbsxuo66/rljf6EIBJrJp87ha4gIUqNkP3fSwoH+g6OVo1g1wKlWtpSLHdgK AFK7hInkgDYdNsaStzB4hRZBMTJcV9M7hcx6HyWUx6dJr/4s3h+46oZnO8DkcRcaft6y 47XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=oj6oOgCKzJ2N+qTpx3fibHKC8CyReqx+5nadi7iOj1E=; b=gAMlmB2jNLIspEPwWYlWzArFS6ylEe+4J4xb13FPf9ayyynmY7DHBZMPhWfcY8PO/k 1RG6+G6hxBUJ5zK78QR7cIZP7tQ3QFIBnWwVcXHrL+yngn32KIkcvMHp57oMJ2l5vK8q M/1XbyYnQMZtR3Rylkmts1M8kJEpWIZ9qdOEZyZwjwEr8uW1osc5luqs35x41LFX8i/P MBKeML81mRQVfBJ67PYo4zlEmqKqUz2FxjrgKiFP18yrZ9qySi7jZqZMLzHch0MtcddW vVS6fOSA4qcVnb36jeBfvKr5bRRpqqf2hN9RcBc1eYITXeK5sqbz0cbQ58ZtAYWgPgyW +5BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=IaN4JYnV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n20si5198869plp.294.2019.01.31.11.32.01; Thu, 31 Jan 2019 11:32:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=IaN4JYnV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728778AbfAaT0p (ORCPT + 99 others); Thu, 31 Jan 2019 14:26:45 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:34227 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726430AbfAaT0k (ORCPT ); Thu, 31 Jan 2019 14:26:40 -0500 Received: by mail-lf1-f67.google.com with SMTP id p6so3252525lfc.1 for ; Thu, 31 Jan 2019 11:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=oj6oOgCKzJ2N+qTpx3fibHKC8CyReqx+5nadi7iOj1E=; b=IaN4JYnVaz5C2nfd6SudPZ0exOlyNSIEt+SdKhzbom8HaC3Q2ooGI5RgdOyhLH1qc/ nerg0YRjx5GkdCKlTctqyRXz4tOlEkvkjZFf7K6c1N75++m0XujSXP+xh1JyUXi3m++W YF+k862BPd7DzJrfENun5NKiUvbMbpxzJlwM1JiJ9TxD94y95VNiyREFzrAUPz1iD7y+ z9e1p6umL951L0Aa6eB8Dj8CxG26ovVL/nC7aSyl6lvmmuo1xRk/RjR030Z0CItURowT +NHKKAWGwbyWNJtzGNeG+WGpJ9DTSzSXnj+Pz1ukYdb52iSNEvgcofhPGcx8MYRV1jS/ lN2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=oj6oOgCKzJ2N+qTpx3fibHKC8CyReqx+5nadi7iOj1E=; b=eot8kNZObVbEAkdrrYILLdYubdXLXv62yKLosPgi43HvEmDCr+ih/21Lr94YCMzOhv VpanPwAoa5SqXz92vAM4JU9YP/Z54jlPPjhGpW3tmTP1ltU0BaKmwrCSanwRLCmzEnMJ 7R/qjL7eywwYIrbYG3gpw17abaHNZqIHcHsRWJJJP8MES1FwJmKy+H88rwrPYB8hTXtW nAr+R4uOrCLsZ24uLY9DldhfA+wbQBGUBd/nv81Xv4aBc+/p8ngN1gQPfxD3pmlYX39H c6rkxMTWdA2HHQfIJeedK6Ts+yc3JolkJHHK4+K2xrZ1LfveIPh/1M6OFrV+Qv5Ji5vk ITfw== X-Gm-Message-State: AJcUukfAcIi3yNlDh0l50bcrlBhcKj7akEfg3XsUFpZOyrp+NmrDuHVC tSogGZQuMC+i5CjD/MU9MeE= X-Received: by 2002:a19:7018:: with SMTP id h24mr27916364lfc.162.1548962797521; Thu, 31 Jan 2019 11:26:37 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id f1sm987363lfm.22.2019.01.31.11.26.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 11:26:37 -0800 (PST) From: Sam Ravnborg To: Thierry Reding , dri-devel@lists.freedesktop.org Cc: Daniel Vetter , David Airlie , Linus Walleij , Stefan Mavrodiev , linux-kernel@vger.kernel.org, Sam Ravnborg Subject: [PATCH v1 03/19] drm/panel: samsung: use DRM_DEV* Date: Thu, 31 Jan 2019 20:26:03 +0100 Message-Id: <20190131192619.9763-4-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190131192619.9763-1-sam@ravnborg.org> References: <20190131192619.9763-1-sam@ravnborg.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce use of DRM_DEV* for logging. This makes logging in the drm subsystem more consistent. Signed-off-by: Sam Ravnborg Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/panel/panel-samsung-ld9040.c | 12 +++++------ drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 15 +++++++------- drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 8 ++++---- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 26 +++++++++++++----------- 4 files changed, 32 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-ld9040.c b/drivers/gpu/drm/panel/panel-samsung-ld9040.c index 7d27b79d0b2a..fec639c19d74 100644 --- a/drivers/gpu/drm/panel/panel-samsung-ld9040.c +++ b/drivers/gpu/drm/panel/panel-samsung-ld9040.c @@ -149,7 +149,7 @@ static void ld9040_dcs_write(struct ld9040 *ctx, const u8 *data, size_t len) if (ctx->error < 0 || len == 0) return; - dev_dbg(ctx->dev, "writing dcs seq: %*ph\n", (int)len, data); + DRM_DEV_DEBUG(ctx->dev, "writing dcs seq: %*ph\n", (int)len, data); ret = ld9040_spi_write_word(ctx, *data); while (!ret && --len) { @@ -158,8 +158,8 @@ static void ld9040_dcs_write(struct ld9040 *ctx, const u8 *data, size_t len) } if (ret) { - dev_err(ctx->dev, "error %d writing dcs seq: %*ph\n", ret, - (int)len, data); + DRM_DEV_ERROR(ctx->dev, "error %d writing dcs seq: %*ph\n", + ret, (int)len, data); ctx->error = ret; } @@ -342,15 +342,15 @@ static int ld9040_probe(struct spi_device *spi) ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(ctx->reset_gpio)) { - dev_err(dev, "cannot get reset-gpios %ld\n", - PTR_ERR(ctx->reset_gpio)); + DRM_DEV_ERROR(dev, "cannot get reset-gpios %ld\n", + PTR_ERR(ctx->reset_gpio)); return PTR_ERR(ctx->reset_gpio); } spi->bits_per_word = 9; ret = spi_setup(spi); if (ret < 0) { - dev_err(dev, "spi setup failed.\n"); + DRM_DEV_ERROR(dev, "spi setup failed.\n"); return ret; } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c index 813afee82ec9..e2f2ee252409 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c @@ -458,7 +458,8 @@ static int s6e3ha2_set_brightness(struct backlight_device *bl_dev) if (brightness < S6E3HA2_MIN_BRIGHTNESS || brightness > bl_dev->props.max_brightness) { - dev_err(ctx->dev, "Invalid brightness: %u\n", brightness); + DRM_DEV_ERROR(ctx->dev, "Invalid brightness: %u\n", + brightness); return -EINVAL; } @@ -706,28 +707,28 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi) ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ctx->supplies); if (ret < 0) { - dev_err(dev, "failed to get regulators: %d\n", ret); + DRM_DEV_ERROR(dev, "failed to get regulators: %d\n", ret); return ret; } ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - dev_err(dev, "cannot get reset-gpios %ld\n", - PTR_ERR(ctx->reset_gpio)); + DRM_DEV_ERROR(dev, "cannot get reset-gpios %ld\n", + PTR_ERR(ctx->reset_gpio)); return PTR_ERR(ctx->reset_gpio); } ctx->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH); if (IS_ERR(ctx->enable_gpio)) { - dev_err(dev, "cannot get enable-gpios %ld\n", - PTR_ERR(ctx->enable_gpio)); + DRM_DEV_ERROR(dev, "cannot get enable-gpios %ld\n", + PTR_ERR(ctx->enable_gpio)); return PTR_ERR(ctx->enable_gpio); } ctx->bl_dev = backlight_device_register("s6e3ha2", dev, ctx, &s6e3ha2_bl_ops, NULL); if (IS_ERR(ctx->bl_dev)) { - dev_err(dev, "failed to register backlight device\n"); + DRM_DEV_ERROR(dev, "failed to register backlight device\n"); return PTR_ERR(ctx->bl_dev); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c index f1c8000e0386..dd50f4089923 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c @@ -458,14 +458,14 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ctx->supplies); if (ret < 0) { - dev_err(dev, "failed to get regulators: %d\n", ret); + DRM_DEV_ERROR(dev, "failed to get regulators: %d\n", ret); return ret; } ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset_gpio)) { - dev_err(dev, "cannot get reset-gpio: %ld\n", - PTR_ERR(ctx->reset_gpio)); + DRM_DEV_ERROR(dev, "cannot get reset-gpio: %ld\n", + PTR_ERR(ctx->reset_gpio)); return PTR_ERR(ctx->reset_gpio); } @@ -476,7 +476,7 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) ctx->bl_dev = backlight_device_register("s6e63j0x03", dev, ctx, &s6e63j0x03_bl_ops, NULL); if (IS_ERR(ctx->bl_dev)) { - dev_err(dev, "failed to register backlight device\n"); + DRM_DEV_ERROR(dev, "failed to register backlight device\n"); return PTR_ERR(ctx->bl_dev); } diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c index b252d23f386f..e3e0766c3a17 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c @@ -147,8 +147,8 @@ static void s6e8aa0_dcs_write(struct s6e8aa0 *ctx, const void *data, size_t len) ret = mipi_dsi_dcs_write_buffer(dsi, data, len); if (ret < 0) { - dev_err(ctx->dev, "error %zd writing dcs seq: %*ph\n", ret, - (int)len, data); + DRM_DEV_ERROR(ctx->dev, "error %zd writing dcs seq: %*ph\n", + ret, (int)len, data); ctx->error = ret; } } @@ -163,7 +163,8 @@ static int s6e8aa0_dcs_read(struct s6e8aa0 *ctx, u8 cmd, void *data, size_t len) ret = mipi_dsi_dcs_read(dsi, cmd, data, len); if (ret < 0) { - dev_err(ctx->dev, "error %d reading dcs seq(%#x)\n", ret, cmd); + DRM_DEV_ERROR(ctx->dev, "error %d reading dcs seq(%#x)\n", + ret, cmd); ctx->error = ret; } @@ -814,9 +815,9 @@ static void s6e8aa0_set_maximum_return_packet_size(struct s6e8aa0 *ctx, ret = mipi_dsi_set_maximum_return_packet_size(dsi, size); if (ret < 0) { - dev_err(ctx->dev, - "error %d setting maximum return packet size to %d\n", - ret, size); + DRM_DEV_ERROR(ctx->dev, + "error %d setting maximum return packet size to %d\n", + ret, size); ctx->error = ret; } } @@ -825,22 +826,23 @@ static void s6e8aa0_read_mtp_id(struct s6e8aa0 *ctx) { u8 id[3]; int ret, i; + struct device *dev = ctx->dev; ret = s6e8aa0_dcs_read(ctx, 0xd1, id, ARRAY_SIZE(id)); if (ret < 0 || ret < ARRAY_SIZE(id) || id[0] == 0x00) { - dev_err(ctx->dev, "read id failed\n"); + DRM_DEV_ERROR(dev, "read id failed\n"); ctx->error = -EIO; return; } - dev_info(ctx->dev, "ID: 0x%2x, 0x%2x, 0x%2x\n", id[0], id[1], id[2]); + DRM_DEV_INFO(dev, "ID: 0x%2x, 0x%2x, 0x%2x\n", id[0], id[1], id[2]); for (i = 0; i < ARRAY_SIZE(s6e8aa0_variants); ++i) { if (id[1] == s6e8aa0_variants[i].version) break; } if (i >= ARRAY_SIZE(s6e8aa0_variants)) { - dev_err(ctx->dev, "unsupported display version %d\n", id[1]); + DRM_DEV_ERROR(dev, "unsupported display version %d\n", id[1]); ctx->error = -EINVAL; return; } @@ -1007,14 +1009,14 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ctx->supplies); if (ret < 0) { - dev_err(dev, "failed to get regulators: %d\n", ret); + DRM_DEV_ERROR(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)) { - dev_err(dev, "cannot get reset-gpios %ld\n", - PTR_ERR(ctx->reset_gpio)); + DRM_DEV_ERROR(dev, "cannot get reset-gpios %ld\n", + PTR_ERR(ctx->reset_gpio)); return PTR_ERR(ctx->reset_gpio); } -- 2.12.0