Skip to content

Commit 26faaed

Browse files
committed
drm: apple: Fix/remove log messages
Add missing training '\n' and remove leftover dev_dbg() statements. Signed-off-by: Janne Grunau <[email protected]>
1 parent 4324b1a commit 26faaed

File tree

6 files changed

+34
-54
lines changed

6 files changed

+34
-54
lines changed

drivers/gpu/drm/apple/afk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static void afk_init_rxtx(struct apple_dcp_afkep *ep, u64 message,
138138
u32 bufsz, end;
139139

140140
if (tag != ep->bfr_tag) {
141-
dev_err(ep->dcp->dev, "AFK[ep:%02x]: expected tag 0x%x but got 0x%x",
141+
dev_err(ep->dcp->dev, "AFK[ep:%02x]: expected tag 0x%x but got 0x%x\n",
142142
ep->endpoint, ep->bfr_tag, tag);
143143
return;
144144
}
@@ -151,15 +151,15 @@ static void afk_init_rxtx(struct apple_dcp_afkep *ep, u64 message,
151151

152152
if (base >= ep->bfr_size) {
153153
dev_err(ep->dcp->dev,
154-
"AFK[ep:%02x]: requested base 0x%x >= max size 0x%lx",
154+
"AFK[ep:%02x]: requested base 0x%x >= max size 0x%lx\n",
155155
ep->endpoint, base, ep->bfr_size);
156156
return;
157157
}
158158

159159
end = base + size;
160160
if (end > ep->bfr_size) {
161161
dev_err(ep->dcp->dev,
162-
"AFK[ep:%02x]: requested end 0x%x > max size 0x%lx",
162+
"AFK[ep:%02x]: requested end 0x%x > max size 0x%lx\n",
163163
ep->endpoint, end, ep->bfr_size);
164164
return;
165165
}
@@ -168,7 +168,7 @@ static void afk_init_rxtx(struct apple_dcp_afkep *ep, u64 message,
168168
bufsz = le32_to_cpu(bfr->hdr->bufsz);
169169
if (bufsz + sizeof(*bfr->hdr) != size) {
170170
dev_err(ep->dcp->dev,
171-
"AFK[ep:%02x]: ring buffer size 0x%x != expected 0x%lx",
171+
"AFK[ep:%02x]: ring buffer size 0x%x != expected 0x%lx\n",
172172
ep->endpoint, bufsz, sizeof(*bfr->hdr));
173173
return;
174174
}

drivers/gpu/drm/apple/apple_drv.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ static void apple_crtc_atomic_enable(struct drm_crtc *crtc,
196196

197197
if (crtc_state->active_changed && crtc_state->active) {
198198
struct apple_crtc *apple_crtc = to_apple_crtc(crtc);
199-
dev_dbg(&apple_crtc->dcp->dev, "%s", __func__);
200199
dcp_poweron(apple_crtc->dcp);
201-
dev_dbg(&apple_crtc->dcp->dev, "%s finished", __func__);
202200
}
203201

204202
if (crtc_state->active)
@@ -213,9 +211,7 @@ static void apple_crtc_atomic_disable(struct drm_crtc *crtc,
213211

214212
if (crtc_state->active_changed && !crtc_state->active) {
215213
struct apple_crtc *apple_crtc = to_apple_crtc(crtc);
216-
dev_dbg(&apple_crtc->dcp->dev, "%s", __func__);
217214
dcp_poweroff(apple_crtc->dcp);
218-
dev_dbg(&apple_crtc->dcp->dev, "%s finished", __func__);
219215
}
220216

221217
if (crtc->state->event && !crtc->state->active) {

drivers/gpu/drm/apple/dcp.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static void dcp_recv_msg(void *cookie, u8 endpoint, u64 message)
128128
afk_receive_message(dcp->dptxep, message);
129129
return;
130130
default:
131-
WARN(endpoint, "unknown DCP endpoint %hhu", endpoint);
131+
WARN(endpoint, "unknown DCP endpoint %hhu\n", endpoint);
132132
}
133133
}
134134

@@ -137,7 +137,7 @@ static void dcp_rtk_crashed(void *cookie)
137137
struct apple_dcp *dcp = cookie;
138138

139139
dcp->crashed = true;
140-
dev_err(dcp->dev, "DCP has crashed");
140+
dev_err(dcp->dev, "DCP has crashed\n");
141141
if (dcp->connector) {
142142
dcp->connector->connected = 0;
143143
schedule_work(&dcp->connector->hotplug_wq);
@@ -169,7 +169,7 @@ static int dcp_rtk_shmem_setup(void *cookie, struct apple_rtkit_shmem *bfr)
169169

170170
bfr->is_mapped = true;
171171
dev_info(dcp->dev,
172-
"shmem_setup: iova: %lx -> pa: %lx -> iomem: %lx",
172+
"shmem_setup: iova: %lx -> pa: %lx -> iomem: %lx\n",
173173
(uintptr_t)bfr->iova, (uintptr_t)phy_addr,
174174
(uintptr_t)bfr->buffer);
175175
} else {
@@ -178,7 +178,7 @@ static int dcp_rtk_shmem_setup(void *cookie, struct apple_rtkit_shmem *bfr)
178178
if (!bfr->buffer)
179179
return -ENOMEM;
180180

181-
dev_info(dcp->dev, "shmem_setup: iova: %lx, buffer: %lx",
181+
dev_info(dcp->dev, "shmem_setup: iova: %lx, buffer: %lx\n",
182182
(uintptr_t)bfr->iova, (uintptr_t)bfr->buffer);
183183
}
184184

@@ -226,7 +226,7 @@ int dcp_crtc_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state)
226226

227227
needs_modeset = drm_atomic_crtc_needs_modeset(crtc_state) || !dcp->valid_mode;
228228
if (!needs_modeset && !dcp->connector->connected) {
229-
dev_err(dcp->dev, "crtc_atomic_check: disconnected but no modeset");
229+
dev_err(dcp->dev, "crtc_atomic_check: disconnected but no modeset\n");
230230
return -EINVAL;
231231
}
232232

@@ -239,7 +239,7 @@ int dcp_crtc_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state)
239239
}
240240

241241
if (plane_count > DCP_MAX_PLANES) {
242-
dev_err(dcp->dev, "crtc_atomic_check: Blend supports only 2 layers!");
242+
dev_err(dcp->dev, "crtc_atomic_check: Blend supports only 2 layers!\n");
243243
return -EINVAL;
244244
}
245245

@@ -355,17 +355,17 @@ int dcp_start(struct platform_device *pdev)
355355
/* start RTKit endpoints */
356356
ret = systemep_init(dcp);
357357
if (ret)
358-
dev_warn(dcp->dev, "Failed to start system endpoint: %d", ret);
358+
dev_warn(dcp->dev, "Failed to start system endpoint: %d\n", ret);
359359

360360
if (dcp->phy && dcp->fw_compat >= DCP_FIRMWARE_V_13_5) {
361361
ret = ibootep_init(dcp);
362362
if (ret)
363-
dev_warn(dcp->dev, "Failed to start IBOOT endpoint: %d",
363+
dev_warn(dcp->dev, "Failed to start IBOOT endpoint: %d\n",
364364
ret);
365365

366366
ret = dptxep_init(dcp);
367367
if (ret)
368-
dev_warn(dcp->dev, "Failed to start DPTX endpoint: %d",
368+
dev_warn(dcp->dev, "Failed to start DPTX endpoint: %d\n",
369369
ret);
370370
else if (dcp->dptxport[0].enabled) {
371371
bool connected;
@@ -388,7 +388,7 @@ int dcp_start(struct platform_device *pdev)
388388

389389
ret = iomfb_start_rtkit(dcp);
390390
if (ret)
391-
dev_err(dcp->dev, "Failed to start IOMFB endpoint: %d", ret);
391+
dev_err(dcp->dev, "Failed to start IOMFB endpoint: %d\n", ret);
392392

393393
return ret;
394394
}
@@ -887,12 +887,12 @@ static int dcp_comp_bind(struct device *dev, struct device *main, void *data)
887887
dcp->rtk = devm_apple_rtkit_init(dev, dcp, "mbox", 0, &rtkit_ops);
888888
if (IS_ERR(dcp->rtk))
889889
return dev_err_probe(dev, PTR_ERR(dcp->rtk),
890-
"Failed to initialize RTKit");
890+
"Failed to initialize RTKit\n");
891891

892892
ret = apple_rtkit_wake(dcp->rtk);
893893
if (ret)
894894
return dev_err_probe(dev, ret,
895-
"Failed to boot RTKit: %d", ret);
895+
"Failed to boot RTKit: %d\n", ret);
896896
return ret;
897897
}
898898

@@ -960,7 +960,7 @@ static int dcp_platform_probe(struct platform_device *pdev)
960960

961961
dcp->phy = devm_phy_optional_get(dev, "dp-phy");
962962
if (IS_ERR(dcp->phy)) {
963-
dev_err(dev, "Failed to get dp-phy: %ld", PTR_ERR(dcp->phy));
963+
dev_err(dev, "Failed to get dp-phy: %ld\n", PTR_ERR(dcp->phy));
964964
return PTR_ERR(dcp->phy);
965965
}
966966
if (dcp->phy) {
@@ -987,7 +987,7 @@ static int dcp_platform_probe(struct platform_device *pdev)
987987
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
988988
"dp2hdmi-hpd-irq", dcp);
989989
if (ret < 0) {
990-
dev_err(dev, "failed to request HDMI hpd irq %d: %d",
990+
dev_err(dev, "failed to request HDMI hpd irq %d: %d\n",
991991
irq, ret);
992992
return ret;
993993
}
@@ -1010,7 +1010,7 @@ static int dcp_platform_probe(struct platform_device *pdev)
10101010
if (!ret) {
10111011
dcp->xbar = devm_mux_control_get(dev, "dp-xbar");
10121012
if (IS_ERR(dcp->xbar)) {
1013-
dev_err(dev, "Failed to get dp-xbar: %ld", PTR_ERR(dcp->xbar));
1013+
dev_err(dev, "Failed to get dp-xbar: %ld\n", PTR_ERR(dcp->xbar));
10141014
return PTR_ERR(dcp->xbar);
10151015
}
10161016
ret = mux_control_select(dcp->xbar, mux_index);

drivers/gpu/drm/apple/dcp_backlight.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static u32 interpolate(int val, int min, int max, u32 *tbl, size_t tbl_size)
9999

100100
size_t index = interpolated / SCALE_FACTOR;
101101

102-
if (WARN(index + 1 >= tbl_size, "invalid index %zu for brightness %u", index, val))
102+
if (WARN(index + 1 >= tbl_size, "invalid index %zu for brightness %u\n", index, val))
103103
return tbl[tbl_size / 2];
104104

105105
frac = interpolated & (SCALE_FACTOR - 1);

drivers/gpu/drm/apple/iomfb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static void dcpep_got_msg(struct apple_dcp *dcp, u64 message)
326326
channel_offset = dcp_channel_offset(ctx_id);
327327

328328
if (channel_offset < 0) {
329-
dev_warn(dcp->dev, "invalid context received %u", ctx_id);
329+
dev_warn(dcp->dev, "invalid context received %u\n", ctx_id);
330330
return;
331331
}
332332

@@ -482,7 +482,7 @@ void dcp_flush(struct drm_crtc *crtc, struct drm_atomic_state *state)
482482

483483
if (dcp_channel_busy(&dcp->ch_cmd))
484484
{
485-
dev_err(dcp->dev, "unexpected busy command channel");
485+
dev_err(dcp->dev, "unexpected busy command channel\n");
486486
/* HACK: issue a delayed vblank event to avoid timeouts in
487487
* drm_atomic_helper_wait_for_vblanks().
488488
*/

0 commit comments

Comments
 (0)