diff options
author | Inki Dae <inki.dae@samsung.com> | 2019-04-15 03:25:12 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2019-04-23 22:23:20 -0400 |
commit | 6be900563a9e7420ead7de5737a004e1878ef145 (patch) | |
tree | 617400f6768901e469337b4affe4dddae679c3ea | |
parent | 6f83d20838c09936b2884d5b35fed8d208679947 (diff) |
drm/exynos: use DRM_DEV_DEBUG* instead of DRM_DEBUG macro
Use DRM_DEV_DEBUG* instead of DRM_DEBUG macro to print out
debug messages.
This patch just cleans up the use of debug log macro, which changes
the log macro to DRM_DEV_DEBUG*.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos7_drm_decon.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimc.c | 85 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fimd.c | 19 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_gem.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_gsc.c | 48 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_ipp.c | 61 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_mic.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_plane.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_vidi.c | 25 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 33 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_mixer.c | 17 |
13 files changed, 191 insertions, 148 deletions
diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index c2715e54db90..73b318a7ef49 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c | |||
@@ -356,7 +356,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win, | |||
356 | break; | 356 | break; |
357 | } | 357 | } |
358 | 358 | ||
359 | DRM_DEBUG_KMS("cpp = %u\n", fb->format->cpp[0]); | 359 | DRM_DEV_DEBUG_KMS(ctx->dev, "cpp = %u\n", fb->format->cpp[0]); |
360 | 360 | ||
361 | /* | 361 | /* |
362 | * In case of exynos, setting dma-burst to 16Word causes permanent | 362 | * In case of exynos, setting dma-burst to 16Word causes permanent |
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c index bc76f2772e44..0217ee9a118d 100644 --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c | |||
@@ -99,7 +99,7 @@ static void decon_wait_for_vblank(struct exynos_drm_crtc *crtc) | |||
99 | if (!wait_event_timeout(ctx->wait_vsync_queue, | 99 | if (!wait_event_timeout(ctx->wait_vsync_queue, |
100 | !atomic_read(&ctx->wait_vsync_event), | 100 | !atomic_read(&ctx->wait_vsync_event), |
101 | HZ/20)) | 101 | HZ/20)) |
102 | DRM_DEBUG_KMS("vblank wait timed out.\n"); | 102 | DRM_DEV_DEBUG_KMS(ctx->dev, "vblank wait timed out.\n"); |
103 | } | 103 | } |
104 | 104 | ||
105 | static void decon_clear_channels(struct exynos_drm_crtc *crtc) | 105 | static void decon_clear_channels(struct exynos_drm_crtc *crtc) |
@@ -313,7 +313,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win, | |||
313 | break; | 313 | break; |
314 | } | 314 | } |
315 | 315 | ||
316 | DRM_DEBUG_KMS("cpp = %d\n", fb->format->cpp[0]); | 316 | DRM_DEV_DEBUG_KMS(ctx->dev, "cpp = %d\n", fb->format->cpp[0]); |
317 | 317 | ||
318 | /* | 318 | /* |
319 | * In case of exynos, setting dma-burst to 16Word causes permanent | 319 | * In case of exynos, setting dma-burst to 16Word causes permanent |
@@ -420,9 +420,9 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc, | |||
420 | writel(state->src.x, ctx->regs + VIDW_OFFSET_X(win)); | 420 | writel(state->src.x, ctx->regs + VIDW_OFFSET_X(win)); |
421 | writel(state->src.y, ctx->regs + VIDW_OFFSET_Y(win)); | 421 | writel(state->src.y, ctx->regs + VIDW_OFFSET_Y(win)); |
422 | 422 | ||
423 | DRM_DEBUG_KMS("start addr = 0x%lx\n", | 423 | DRM_DEV_DEBUG_KMS(ctx->dev, "start addr = 0x%lx\n", |
424 | (unsigned long)val); | 424 | (unsigned long)val); |
425 | DRM_DEBUG_KMS("ovl_width = %d, ovl_height = %d\n", | 425 | DRM_DEV_DEBUG_KMS(ctx->dev, "ovl_width = %d, ovl_height = %d\n", |
426 | state->crtc.w, state->crtc.h); | 426 | state->crtc.w, state->crtc.h); |
427 | 427 | ||
428 | val = VIDOSDxA_TOPLEFT_X(state->crtc.x) | | 428 | val = VIDOSDxA_TOPLEFT_X(state->crtc.x) | |
@@ -440,7 +440,7 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc, | |||
440 | 440 | ||
441 | writel(val, ctx->regs + VIDOSD_B(win)); | 441 | writel(val, ctx->regs + VIDOSD_B(win)); |
442 | 442 | ||
443 | DRM_DEBUG_KMS("osd pos: tx = %d, ty = %d, bx = %d, by = %d\n", | 443 | DRM_DEV_DEBUG_KMS(ctx->dev, "osd pos: tx = %d, ty = %d, bx = %d, by = %d\n", |
444 | state->crtc.x, state->crtc.y, last_x, last_y); | 444 | state->crtc.x, state->crtc.y, last_x, last_y); |
445 | 445 | ||
446 | /* OSD alpha */ | 446 | /* OSD alpha */ |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index ca3f6cda1fda..724cb52a374a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |||
@@ -122,9 +122,10 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, | |||
122 | unsigned long size; | 122 | unsigned long size; |
123 | int ret; | 123 | int ret; |
124 | 124 | ||
125 | DRM_DEBUG_KMS("surface width(%d), height(%d) and bpp(%d\n", | 125 | DRM_DEV_DEBUG_KMS(dev->dev, |
126 | sizes->surface_width, sizes->surface_height, | 126 | "surface width(%d), height(%d) and bpp(%d\n", |
127 | sizes->surface_bpp); | 127 | sizes->surface_width, sizes->surface_height, |
128 | sizes->surface_bpp); | ||
128 | 129 | ||
129 | mode_cmd.width = sizes->surface_width; | 130 | mode_cmd.width = sizes->surface_width; |
130 | mode_cmd.height = sizes->surface_height; | 131 | mode_cmd.height = sizes->surface_height; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index 5a5641b43c6a..71b0cb123a56 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c | |||
@@ -186,7 +186,7 @@ static void fimc_handle_jpeg(struct fimc_context *ctx, bool enable) | |||
186 | { | 186 | { |
187 | u32 cfg; | 187 | u32 cfg; |
188 | 188 | ||
189 | DRM_DEBUG_KMS("enable[%d]\n", enable); | 189 | DRM_DEV_DEBUG_KMS(ctx->dev, "enable[%d]\n", enable); |
190 | 190 | ||
191 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); | 191 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); |
192 | if (enable) | 192 | if (enable) |
@@ -201,7 +201,7 @@ static void fimc_mask_irq(struct fimc_context *ctx, bool enable) | |||
201 | { | 201 | { |
202 | u32 cfg; | 202 | u32 cfg; |
203 | 203 | ||
204 | DRM_DEBUG_KMS("enable[%d]\n", enable); | 204 | DRM_DEV_DEBUG_KMS(ctx->dev, "enable[%d]\n", enable); |
205 | 205 | ||
206 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); | 206 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); |
207 | if (enable) { | 207 | if (enable) { |
@@ -225,7 +225,7 @@ static bool fimc_check_ovf(struct fimc_context *ctx) | |||
225 | flag = EXYNOS_CISTATUS_OVFIY | EXYNOS_CISTATUS_OVFICB | | 225 | flag = EXYNOS_CISTATUS_OVFIY | EXYNOS_CISTATUS_OVFICB | |
226 | EXYNOS_CISTATUS_OVFICR; | 226 | EXYNOS_CISTATUS_OVFICR; |
227 | 227 | ||
228 | DRM_DEBUG_KMS("flag[0x%x]\n", flag); | 228 | DRM_DEV_DEBUG_KMS(ctx->dev, "flag[0x%x]\n", flag); |
229 | 229 | ||
230 | if (status & flag) { | 230 | if (status & flag) { |
231 | fimc_set_bits(ctx, EXYNOS_CIWDOFST, | 231 | fimc_set_bits(ctx, EXYNOS_CIWDOFST, |
@@ -247,7 +247,7 @@ static bool fimc_check_frame_end(struct fimc_context *ctx) | |||
247 | 247 | ||
248 | cfg = fimc_read(ctx, EXYNOS_CISTATUS); | 248 | cfg = fimc_read(ctx, EXYNOS_CISTATUS); |
249 | 249 | ||
250 | DRM_DEBUG_KMS("cfg[0x%x]\n", cfg); | 250 | DRM_DEV_DEBUG_KMS(ctx->dev, "cfg[0x%x]\n", cfg); |
251 | 251 | ||
252 | if (!(cfg & EXYNOS_CISTATUS_FRAMEEND)) | 252 | if (!(cfg & EXYNOS_CISTATUS_FRAMEEND)) |
253 | return false; | 253 | return false; |
@@ -269,9 +269,9 @@ static int fimc_get_buf_id(struct fimc_context *ctx) | |||
269 | if (frame_cnt == 0) | 269 | if (frame_cnt == 0) |
270 | frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg); | 270 | frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg); |
271 | 271 | ||
272 | DRM_DEBUG_KMS("present[%d]before[%d]\n", | 272 | DRM_DEV_DEBUG_KMS(ctx->dev, "present[%d]before[%d]\n", |
273 | EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg), | 273 | EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg), |
274 | EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg)); | 274 | EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg)); |
275 | 275 | ||
276 | if (frame_cnt == 0) { | 276 | if (frame_cnt == 0) { |
277 | DRM_DEV_ERROR(ctx->dev, "failed to get frame count.\n"); | 277 | DRM_DEV_ERROR(ctx->dev, "failed to get frame count.\n"); |
@@ -279,7 +279,7 @@ static int fimc_get_buf_id(struct fimc_context *ctx) | |||
279 | } | 279 | } |
280 | 280 | ||
281 | buf_id = frame_cnt - 1; | 281 | buf_id = frame_cnt - 1; |
282 | DRM_DEBUG_KMS("buf_id[%d]\n", buf_id); | 282 | DRM_DEV_DEBUG_KMS(ctx->dev, "buf_id[%d]\n", buf_id); |
283 | 283 | ||
284 | return buf_id; | 284 | return buf_id; |
285 | } | 285 | } |
@@ -288,7 +288,7 @@ static void fimc_handle_lastend(struct fimc_context *ctx, bool enable) | |||
288 | { | 288 | { |
289 | u32 cfg; | 289 | u32 cfg; |
290 | 290 | ||
291 | DRM_DEBUG_KMS("enable[%d]\n", enable); | 291 | DRM_DEV_DEBUG_KMS(ctx->dev, "enable[%d]\n", enable); |
292 | 292 | ||
293 | cfg = fimc_read(ctx, EXYNOS_CIOCTRL); | 293 | cfg = fimc_read(ctx, EXYNOS_CIOCTRL); |
294 | if (enable) | 294 | if (enable) |
@@ -303,7 +303,7 @@ static void fimc_src_set_fmt_order(struct fimc_context *ctx, u32 fmt) | |||
303 | { | 303 | { |
304 | u32 cfg; | 304 | u32 cfg; |
305 | 305 | ||
306 | DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); | 306 | DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
307 | 307 | ||
308 | /* RGB */ | 308 | /* RGB */ |
309 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); | 309 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); |
@@ -368,7 +368,7 @@ static void fimc_src_set_fmt(struct fimc_context *ctx, u32 fmt, bool tiled) | |||
368 | { | 368 | { |
369 | u32 cfg; | 369 | u32 cfg; |
370 | 370 | ||
371 | DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); | 371 | DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
372 | 372 | ||
373 | cfg = fimc_read(ctx, EXYNOS_MSCTRL); | 373 | cfg = fimc_read(ctx, EXYNOS_MSCTRL); |
374 | cfg &= ~EXYNOS_MSCTRL_INFORMAT_RGB; | 374 | cfg &= ~EXYNOS_MSCTRL_INFORMAT_RGB; |
@@ -421,7 +421,7 @@ static void fimc_src_set_transf(struct fimc_context *ctx, unsigned int rotation) | |||
421 | unsigned int degree = rotation & DRM_MODE_ROTATE_MASK; | 421 | unsigned int degree = rotation & DRM_MODE_ROTATE_MASK; |
422 | u32 cfg1, cfg2; | 422 | u32 cfg1, cfg2; |
423 | 423 | ||
424 | DRM_DEBUG_KMS("rotation[%x]\n", rotation); | 424 | DRM_DEV_DEBUG_KMS(ctx->dev, "rotation[%x]\n", rotation); |
425 | 425 | ||
426 | cfg1 = fimc_read(ctx, EXYNOS_MSCTRL); | 426 | cfg1 = fimc_read(ctx, EXYNOS_MSCTRL); |
427 | cfg1 &= ~(EXYNOS_MSCTRL_FLIP_X_MIRROR | | 427 | cfg1 &= ~(EXYNOS_MSCTRL_FLIP_X_MIRROR | |
@@ -479,10 +479,11 @@ static void fimc_set_window(struct fimc_context *ctx, | |||
479 | v1 = buf->rect.y; | 479 | v1 = buf->rect.y; |
480 | v2 = buf->buf.height - buf->rect.h - buf->rect.y; | 480 | v2 = buf->buf.height - buf->rect.h - buf->rect.y; |
481 | 481 | ||
482 | DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]hsize[%d]vsize[%d]\n", | 482 | DRM_DEV_DEBUG_KMS(ctx->dev, "x[%d]y[%d]w[%d]h[%d]hsize[%d]vsize[%d]\n", |
483 | buf->rect.x, buf->rect.y, buf->rect.w, buf->rect.h, | 483 | buf->rect.x, buf->rect.y, buf->rect.w, buf->rect.h, |
484 | real_width, buf->buf.height); | 484 | real_width, buf->buf.height); |
485 | DRM_DEBUG_KMS("h1[%d]h2[%d]v1[%d]v2[%d]\n", h1, h2, v1, v2); | 485 | DRM_DEV_DEBUG_KMS(ctx->dev, "h1[%d]h2[%d]v1[%d]v2[%d]\n", h1, h2, v1, |
486 | v2); | ||
486 | 487 | ||
487 | /* | 488 | /* |
488 | * set window offset 1, 2 size | 489 | * set window offset 1, 2 size |
@@ -507,7 +508,8 @@ static void fimc_src_set_size(struct fimc_context *ctx, | |||
507 | unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0]; | 508 | unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0]; |
508 | u32 cfg; | 509 | u32 cfg; |
509 | 510 | ||
510 | DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", real_width, buf->buf.height); | 511 | DRM_DEV_DEBUG_KMS(ctx->dev, "hsize[%d]vsize[%d]\n", real_width, |
512 | buf->buf.height); | ||
511 | 513 | ||
512 | /* original size */ | 514 | /* original size */ |
513 | cfg = (EXYNOS_ORGISIZE_HORIZONTAL(real_width) | | 515 | cfg = (EXYNOS_ORGISIZE_HORIZONTAL(real_width) | |
@@ -515,8 +517,8 @@ static void fimc_src_set_size(struct fimc_context *ctx, | |||
515 | 517 | ||
516 | fimc_write(ctx, cfg, EXYNOS_ORGISIZE); | 518 | fimc_write(ctx, cfg, EXYNOS_ORGISIZE); |
517 | 519 | ||
518 | DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, buf->rect.y, | 520 | DRM_DEV_DEBUG_KMS(ctx->dev, "x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, |
519 | buf->rect.w, buf->rect.h); | 521 | buf->rect.y, buf->rect.w, buf->rect.h); |
520 | 522 | ||
521 | /* set input DMA image size */ | 523 | /* set input DMA image size */ |
522 | cfg = fimc_read(ctx, EXYNOS_CIREAL_ISIZE); | 524 | cfg = fimc_read(ctx, EXYNOS_CIREAL_ISIZE); |
@@ -561,7 +563,7 @@ static void fimc_dst_set_fmt_order(struct fimc_context *ctx, u32 fmt) | |||
561 | { | 563 | { |
562 | u32 cfg; | 564 | u32 cfg; |
563 | 565 | ||
564 | DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); | 566 | DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
565 | 567 | ||
566 | /* RGB */ | 568 | /* RGB */ |
567 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); | 569 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); |
@@ -632,7 +634,7 @@ static void fimc_dst_set_fmt(struct fimc_context *ctx, u32 fmt, bool tiled) | |||
632 | { | 634 | { |
633 | u32 cfg; | 635 | u32 cfg; |
634 | 636 | ||
635 | DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); | 637 | DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
636 | 638 | ||
637 | cfg = fimc_read(ctx, EXYNOS_CIEXTEN); | 639 | cfg = fimc_read(ctx, EXYNOS_CIEXTEN); |
638 | 640 | ||
@@ -692,7 +694,7 @@ static void fimc_dst_set_transf(struct fimc_context *ctx, unsigned int rotation) | |||
692 | unsigned int degree = rotation & DRM_MODE_ROTATE_MASK; | 694 | unsigned int degree = rotation & DRM_MODE_ROTATE_MASK; |
693 | u32 cfg; | 695 | u32 cfg; |
694 | 696 | ||
695 | DRM_DEBUG_KMS("rotation[0x%x]\n", rotation); | 697 | DRM_DEV_DEBUG_KMS(ctx->dev, "rotation[0x%x]\n", rotation); |
696 | 698 | ||
697 | cfg = fimc_read(ctx, EXYNOS_CITRGFMT); | 699 | cfg = fimc_read(ctx, EXYNOS_CITRGFMT); |
698 | cfg &= ~EXYNOS_CITRGFMT_FLIP_MASK; | 700 | cfg &= ~EXYNOS_CITRGFMT_FLIP_MASK; |
@@ -776,19 +778,20 @@ static int fimc_set_prescaler(struct fimc_context *ctx, struct fimc_scaler *sc, | |||
776 | 778 | ||
777 | pre_dst_width = src_w >> hfactor; | 779 | pre_dst_width = src_w >> hfactor; |
778 | pre_dst_height = src_h >> vfactor; | 780 | pre_dst_height = src_h >> vfactor; |
779 | DRM_DEBUG_KMS("pre_dst_width[%d]pre_dst_height[%d]\n", | 781 | DRM_DEV_DEBUG_KMS(ctx->dev, "pre_dst_width[%d]pre_dst_height[%d]\n", |
780 | pre_dst_width, pre_dst_height); | 782 | pre_dst_width, pre_dst_height); |
781 | DRM_DEBUG_KMS("hfactor[%d]vfactor[%d]\n", hfactor, vfactor); | 783 | DRM_DEV_DEBUG_KMS(ctx->dev, "hfactor[%d]vfactor[%d]\n", hfactor, |
784 | vfactor); | ||
782 | 785 | ||
783 | sc->hratio = (src_w << 14) / (dst_w << hfactor); | 786 | sc->hratio = (src_w << 14) / (dst_w << hfactor); |
784 | sc->vratio = (src_h << 14) / (dst_h << vfactor); | 787 | sc->vratio = (src_h << 14) / (dst_h << vfactor); |
785 | sc->up_h = (dst_w >= src_w) ? true : false; | 788 | sc->up_h = (dst_w >= src_w) ? true : false; |
786 | sc->up_v = (dst_h >= src_h) ? true : false; | 789 | sc->up_v = (dst_h >= src_h) ? true : false; |
787 | DRM_DEBUG_KMS("hratio[%d]vratio[%d]up_h[%d]up_v[%d]\n", | 790 | DRM_DEV_DEBUG_KMS(ctx->dev, "hratio[%d]vratio[%d]up_h[%d]up_v[%d]\n", |
788 | sc->hratio, sc->vratio, sc->up_h, sc->up_v); | 791 | sc->hratio, sc->vratio, sc->up_h, sc->up_v); |
789 | 792 | ||
790 | shfactor = FIMC_SHFACTOR - (hfactor + vfactor); | 793 | shfactor = FIMC_SHFACTOR - (hfactor + vfactor); |
791 | DRM_DEBUG_KMS("shfactor[%d]\n", shfactor); | 794 | DRM_DEV_DEBUG_KMS(ctx->dev, "shfactor[%d]\n", shfactor); |
792 | 795 | ||
793 | cfg = (EXYNOS_CISCPRERATIO_SHFACTOR(shfactor) | | 796 | cfg = (EXYNOS_CISCPRERATIO_SHFACTOR(shfactor) | |
794 | EXYNOS_CISCPRERATIO_PREHORRATIO(1 << hfactor) | | 797 | EXYNOS_CISCPRERATIO_PREHORRATIO(1 << hfactor) | |
@@ -806,10 +809,10 @@ static void fimc_set_scaler(struct fimc_context *ctx, struct fimc_scaler *sc) | |||
806 | { | 809 | { |
807 | u32 cfg, cfg_ext; | 810 | u32 cfg, cfg_ext; |
808 | 811 | ||
809 | DRM_DEBUG_KMS("range[%d]bypass[%d]up_h[%d]up_v[%d]\n", | 812 | DRM_DEV_DEBUG_KMS(ctx->dev, "range[%d]bypass[%d]up_h[%d]up_v[%d]\n", |
810 | sc->range, sc->bypass, sc->up_h, sc->up_v); | 813 | sc->range, sc->bypass, sc->up_h, sc->up_v); |
811 | DRM_DEBUG_KMS("hratio[%d]vratio[%d]\n", | 814 | DRM_DEV_DEBUG_KMS(ctx->dev, "hratio[%d]vratio[%d]\n", |
812 | sc->hratio, sc->vratio); | 815 | sc->hratio, sc->vratio); |
813 | 816 | ||
814 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); | 817 | cfg = fimc_read(ctx, EXYNOS_CISCCTRL); |
815 | cfg &= ~(EXYNOS_CISCCTRL_SCALERBYPASS | | 818 | cfg &= ~(EXYNOS_CISCCTRL_SCALERBYPASS | |
@@ -847,7 +850,8 @@ static void fimc_dst_set_size(struct fimc_context *ctx, | |||
847 | unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0]; | 850 | unsigned int real_width = buf->buf.pitch[0] / buf->format->cpp[0]; |
848 | u32 cfg, cfg_ext; | 851 | u32 cfg, cfg_ext; |
849 | 852 | ||
850 | DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", real_width, buf->buf.height); | 853 | DRM_DEV_DEBUG_KMS(ctx->dev, "hsize[%d]vsize[%d]\n", real_width, |
854 | buf->buf.height); | ||
851 | 855 | ||
852 | /* original size */ | 856 | /* original size */ |
853 | cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(real_width) | | 857 | cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(real_width) | |
@@ -855,8 +859,9 @@ static void fimc_dst_set_size(struct fimc_context *ctx, | |||
855 | 859 | ||
856 | fimc_write(ctx, cfg, EXYNOS_ORGOSIZE); | 860 | fimc_write(ctx, cfg, EXYNOS_ORGOSIZE); |
857 | 861 | ||
858 | DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, buf->rect.y, | 862 | DRM_DEV_DEBUG_KMS(ctx->dev, "x[%d]y[%d]w[%d]h[%d]\n", buf->rect.x, |
859 | buf->rect.w, buf->rect.h); | 863 | buf->rect.y, |
864 | buf->rect.w, buf->rect.h); | ||
860 | 865 | ||
861 | /* CSC ITU */ | 866 | /* CSC ITU */ |
862 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); | 867 | cfg = fimc_read(ctx, EXYNOS_CIGCTRL); |
@@ -906,7 +911,7 @@ static void fimc_dst_set_buf_seq(struct fimc_context *ctx, u32 buf_id, | |||
906 | u32 buf_num; | 911 | u32 buf_num; |
907 | u32 cfg; | 912 | u32 cfg; |
908 | 913 | ||
909 | DRM_DEBUG_KMS("buf_id[%d]enqueu[%d]\n", buf_id, enqueue); | 914 | DRM_DEV_DEBUG_KMS(ctx->dev, "buf_id[%d]enqueu[%d]\n", buf_id, enqueue); |
910 | 915 | ||
911 | spin_lock_irqsave(&ctx->lock, flags); | 916 | spin_lock_irqsave(&ctx->lock, flags); |
912 | 917 | ||
@@ -946,7 +951,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id) | |||
946 | struct fimc_context *ctx = dev_id; | 951 | struct fimc_context *ctx = dev_id; |
947 | int buf_id; | 952 | int buf_id; |
948 | 953 | ||
949 | DRM_DEBUG_KMS("fimc id[%d]\n", ctx->id); | 954 | DRM_DEV_DEBUG_KMS(ctx->dev, "fimc id[%d]\n", ctx->id); |
950 | 955 | ||
951 | fimc_clear_irq(ctx); | 956 | fimc_clear_irq(ctx); |
952 | if (fimc_check_ovf(ctx)) | 957 | if (fimc_check_ovf(ctx)) |
@@ -959,7 +964,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id) | |||
959 | if (buf_id < 0) | 964 | if (buf_id < 0) |
960 | return IRQ_HANDLED; | 965 | return IRQ_HANDLED; |
961 | 966 | ||
962 | DRM_DEBUG_KMS("buf_id[%d]\n", buf_id); | 967 | DRM_DEV_DEBUG_KMS(ctx->dev, "buf_id[%d]\n", buf_id); |
963 | 968 | ||
964 | if (ctx->task) { | 969 | if (ctx->task) { |
965 | struct exynos_drm_ipp_task *task = ctx->task; | 970 | struct exynos_drm_ipp_task *task = ctx->task; |
@@ -1381,7 +1386,7 @@ static int fimc_runtime_suspend(struct device *dev) | |||
1381 | { | 1386 | { |
1382 | struct fimc_context *ctx = get_fimc_context(dev); | 1387 | struct fimc_context *ctx = get_fimc_context(dev); |
1383 | 1388 | ||
1384 | DRM_DEBUG_KMS("id[%d]\n", ctx->id); | 1389 | DRM_DEV_DEBUG_KMS(dev, "id[%d]\n", ctx->id); |
1385 | clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]); | 1390 | clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]); |
1386 | return 0; | 1391 | return 0; |
1387 | } | 1392 | } |
@@ -1390,7 +1395,7 @@ static int fimc_runtime_resume(struct device *dev) | |||
1390 | { | 1395 | { |
1391 | struct fimc_context *ctx = get_fimc_context(dev); | 1396 | struct fimc_context *ctx = get_fimc_context(dev); |
1392 | 1397 | ||
1393 | DRM_DEBUG_KMS("id[%d]\n", ctx->id); | 1398 | DRM_DEV_DEBUG_KMS(dev, "id[%d]\n", ctx->id); |
1394 | return clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]); | 1399 | return clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]); |
1395 | } | 1400 | } |
1396 | #endif | 1401 | #endif |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 5b109ae1b390..8039e1a3671d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -315,7 +315,7 @@ static void fimd_wait_for_vblank(struct exynos_drm_crtc *crtc) | |||
315 | if (!wait_event_timeout(ctx->wait_vsync_queue, | 315 | if (!wait_event_timeout(ctx->wait_vsync_queue, |
316 | !atomic_read(&ctx->wait_vsync_event), | 316 | !atomic_read(&ctx->wait_vsync_event), |
317 | HZ/20)) | 317 | HZ/20)) |
318 | DRM_DEBUG_KMS("vblank wait timed out.\n"); | 318 | DRM_DEV_DEBUG_KMS(ctx->dev, "vblank wait timed out.\n"); |
319 | } | 319 | } |
320 | 320 | ||
321 | static void fimd_enable_video_output(struct fimd_context *ctx, unsigned int win, | 321 | static void fimd_enable_video_output(struct fimd_context *ctx, unsigned int win, |
@@ -817,10 +817,11 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc, | |||
817 | val = (unsigned long)(dma_addr + size); | 817 | val = (unsigned long)(dma_addr + size); |
818 | writel(val, ctx->regs + VIDWx_BUF_END(win, 0)); | 818 | writel(val, ctx->regs + VIDWx_BUF_END(win, 0)); |
819 | 819 | ||
820 | DRM_DEBUG_KMS("start addr = 0x%lx, end addr = 0x%lx, size = 0x%lx\n", | 820 | DRM_DEV_DEBUG_KMS(ctx->dev, |
821 | (unsigned long)dma_addr, val, size); | 821 | "start addr = 0x%lx, end addr = 0x%lx, size = 0x%lx\n", |
822 | DRM_DEBUG_KMS("ovl_width = %d, ovl_height = %d\n", | 822 | (unsigned long)dma_addr, val, size); |
823 | state->crtc.w, state->crtc.h); | 823 | DRM_DEV_DEBUG_KMS(ctx->dev, "ovl_width = %d, ovl_height = %d\n", |
824 | state->crtc.w, state->crtc.h); | ||
824 | 825 | ||
825 | /* buffer size */ | 826 | /* buffer size */ |
826 | buf_offsize = pitch - (state->crtc.w * cpp); | 827 | buf_offsize = pitch - (state->crtc.w * cpp); |
@@ -850,8 +851,9 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc, | |||
850 | 851 | ||
851 | writel(val, ctx->regs + VIDOSD_B(win)); | 852 | writel(val, ctx->regs + VIDOSD_B(win)); |
852 | 853 | ||
853 | DRM_DEBUG_KMS("osd pos: tx = %d, ty = %d, bx = %d, by = %d\n", | 854 | DRM_DEV_DEBUG_KMS(ctx->dev, |
854 | state->crtc.x, state->crtc.y, last_x, last_y); | 855 | "osd pos: tx = %d, ty = %d, bx = %d, by = %d\n", |
856 | state->crtc.x, state->crtc.y, last_x, last_y); | ||
855 | 857 | ||
856 | /* OSD size */ | 858 | /* OSD size */ |
857 | if (win != 3 && win != 4) { | 859 | if (win != 3 && win != 4) { |
@@ -861,7 +863,8 @@ static void fimd_update_plane(struct exynos_drm_crtc *crtc, | |||
861 | val = state->crtc.w * state->crtc.h; | 863 | val = state->crtc.w * state->crtc.h; |
862 | writel(val, ctx->regs + offset); | 864 | writel(val, ctx->regs + offset); |
863 | 865 | ||
864 | DRM_DEBUG_KMS("osd size = 0x%x\n", (unsigned int)val); | 866 | DRM_DEV_DEBUG_KMS(ctx->dev, "osd size = 0x%x\n", |
867 | (unsigned int)val); | ||
865 | } | 868 | } |
866 | 869 | ||
867 | fimd_win_set_pixfmt(ctx, win, fb, state->src.w); | 870 | fimd_win_set_pixfmt(ctx, win, fb, state->src.w); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index 7b4883b1e29c..a55f5ac41bf3 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c | |||
@@ -29,7 +29,7 @@ static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem) | |||
29 | int ret = -ENOMEM; | 29 | int ret = -ENOMEM; |
30 | 30 | ||
31 | if (exynos_gem->dma_addr) { | 31 | if (exynos_gem->dma_addr) { |
32 | DRM_DEBUG_KMS("already allocated.\n"); | 32 | DRM_DEV_DEBUG_KMS(to_dma_dev(dev), "already allocated.\n"); |
33 | return 0; | 33 | return 0; |
34 | } | 34 | } |
35 | 35 | ||
@@ -90,7 +90,7 @@ static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem) | |||
90 | 90 | ||
91 | sg_free_table(&sgt); | 91 | sg_free_table(&sgt); |
92 | 92 | ||
93 | DRM_DEBUG_KMS("dma_addr(0x%lx), size(0x%lx)\n", | 93 | DRM_DEV_DEBUG_KMS(to_dma_dev(dev), "dma_addr(0x%lx), size(0x%lx)\n", |
94 | (unsigned long)exynos_gem->dma_addr, exynos_gem->size); | 94 | (unsigned long)exynos_gem->dma_addr, exynos_gem->size); |
95 | 95 | ||
96 | return 0; | 96 | return 0; |
@@ -111,11 +111,11 @@ static void exynos_drm_free_buf(struct exynos_drm_gem *exynos_gem) | |||
111 | struct drm_device *dev = exynos_gem->base.dev; | 111 | struct drm_device *dev = exynos_gem->base.dev; |
112 | 112 | ||
113 | if (!exynos_gem->dma_addr) { | 113 | if (!exynos_gem->dma_addr) { |
114 | DRM_DEBUG_KMS("dma_addr is invalid.\n"); | 114 | DRM_DEV_DEBUG_KMS(dev->dev, "dma_addr is invalid.\n"); |
115 | return; | 115 | return; |
116 | } | 116 | } |
117 | 117 | ||
118 | DRM_DEBUG_KMS("dma_addr(0x%lx), size(0x%lx)\n", | 118 | DRM_DEV_DEBUG_KMS(dev->dev, "dma_addr(0x%lx), size(0x%lx)\n", |
119 | (unsigned long)exynos_gem->dma_addr, exynos_gem->size); | 119 | (unsigned long)exynos_gem->dma_addr, exynos_gem->size); |
120 | 120 | ||
121 | dma_free_attrs(to_dma_dev(dev), exynos_gem->size, exynos_gem->cookie, | 121 | dma_free_attrs(to_dma_dev(dev), exynos_gem->size, exynos_gem->cookie, |
@@ -139,7 +139,7 @@ static int exynos_drm_gem_handle_create(struct drm_gem_object *obj, | |||
139 | if (ret) | 139 | if (ret) |
140 | return ret; | 140 | return ret; |
141 | 141 | ||
142 | DRM_DEBUG_KMS("gem handle = 0x%x\n", *handle); | 142 | DRM_DEV_DEBUG_KMS(to_dma_dev(obj->dev), "gem handle = 0x%x\n", *handle); |
143 | 143 | ||
144 | /* drop reference from allocate - handle holds it now. */ | 144 | /* drop reference from allocate - handle holds it now. */ |
145 | drm_gem_object_put_unlocked(obj); | 145 | drm_gem_object_put_unlocked(obj); |
@@ -151,7 +151,8 @@ void exynos_drm_gem_destroy(struct exynos_drm_gem *exynos_gem) | |||
151 | { | 151 | { |
152 | struct drm_gem_object *obj = &exynos_gem->base; | 152 | struct drm_gem_object *obj = &exynos_gem->base; |
153 | 153 | ||
154 | DRM_DEBUG_KMS("handle count = %d\n", obj->handle_count); | 154 | DRM_DEV_DEBUG_KMS(to_dma_dev(obj->dev), "handle count = %d\n", |
155 | obj->handle_count); | ||
155 | 156 | ||
156 | /* | 157 | /* |
157 | * do not release memory region from exporter. | 158 | * do not release memory region from exporter. |
@@ -198,7 +199,7 @@ static struct exynos_drm_gem *exynos_drm_gem_init(struct drm_device *dev, | |||
198 | return ERR_PTR(ret); | 199 | return ERR_PTR(ret); |
199 | } | 200 | } |
200 | 201 | ||
201 | DRM_DEBUG_KMS("created file object = %pK\n", obj->filp); | 202 | DRM_DEV_DEBUG_KMS(dev->dev, "created file object = %pK\n", obj->filp); |
202 | 203 | ||
203 | return exynos_gem; | 204 | return exynos_gem; |
204 | } | 205 | } |
@@ -409,7 +410,8 @@ static int exynos_drm_gem_mmap_obj(struct drm_gem_object *obj, | |||
409 | struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj); | 410 | struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj); |
410 | int ret; | 411 | int ret; |
411 | 412 | ||
412 | DRM_DEBUG_KMS("flags = 0x%x\n", exynos_gem->flags); | 413 | DRM_DEV_DEBUG_KMS(to_dma_dev(obj->dev), "flags = 0x%x\n", |
414 | exynos_gem->flags); | ||
413 | 415 | ||
414 | /* non-cachable as default. */ | 416 | /* non-cachable as default. */ |
415 | if (exynos_gem->flags & EXYNOS_BO_CACHABLE) | 417 | if (exynos_gem->flags & EXYNOS_BO_CACHABLE) |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index ef10e45f9e7d..433df3ef731b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c | |||
@@ -422,8 +422,8 @@ static void gsc_handle_irq(struct gsc_context *ctx, bool enable, | |||
422 | { | 422 | { |
423 | u32 cfg; | 423 | u32 cfg; |
424 | 424 | ||
425 | DRM_DEBUG_KMS("enable[%d]overflow[%d]level[%d]\n", | 425 | DRM_DEV_DEBUG_KMS(ctx->dev, "enable[%d]overflow[%d]level[%d]\n", |
426 | enable, overflow, done); | 426 | enable, overflow, done); |
427 | 427 | ||
428 | cfg = gsc_read(GSC_IRQ); | 428 | cfg = gsc_read(GSC_IRQ); |
429 | cfg |= (GSC_IRQ_OR_MASK | GSC_IRQ_FRMDONE_MASK); | 429 | cfg |= (GSC_IRQ_OR_MASK | GSC_IRQ_FRMDONE_MASK); |
@@ -451,7 +451,7 @@ static void gsc_src_set_fmt(struct gsc_context *ctx, u32 fmt, bool tiled) | |||
451 | { | 451 | { |
452 | u32 cfg; | 452 | u32 cfg; |
453 | 453 | ||
454 | DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); | 454 | DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
455 | 455 | ||
456 | cfg = gsc_read(GSC_IN_CON); | 456 | cfg = gsc_read(GSC_IN_CON); |
457 | cfg &= ~(GSC_IN_RGB_TYPE_MASK | GSC_IN_YUV422_1P_ORDER_MASK | | 457 | cfg &= ~(GSC_IN_RGB_TYPE_MASK | GSC_IN_YUV422_1P_ORDER_MASK | |
@@ -638,7 +638,7 @@ static void gsc_dst_set_fmt(struct gsc_context *ctx, u32 fmt, bool tiled) | |||
638 | { | 638 | { |
639 | u32 cfg; | 639 | u32 cfg; |
640 | 640 | ||
641 | DRM_DEBUG_KMS("fmt[0x%x]\n", fmt); | 641 | DRM_DEV_DEBUG_KMS(ctx->dev, "fmt[0x%x]\n", fmt); |
642 | 642 | ||
643 | cfg = gsc_read(GSC_OUT_CON); | 643 | cfg = gsc_read(GSC_OUT_CON); |
644 | cfg &= ~(GSC_OUT_RGB_TYPE_MASK | GSC_OUT_YUV422_1P_ORDER_MASK | | 644 | cfg &= ~(GSC_OUT_RGB_TYPE_MASK | GSC_OUT_YUV422_1P_ORDER_MASK | |
@@ -709,7 +709,7 @@ static void gsc_dst_set_fmt(struct gsc_context *ctx, u32 fmt, bool tiled) | |||
709 | static int gsc_get_ratio_shift(struct gsc_context *ctx, u32 src, u32 dst, | 709 | static int gsc_get_ratio_shift(struct gsc_context *ctx, u32 src, u32 dst, |
710 | u32 *ratio) | 710 | u32 *ratio) |
711 | { | 711 | { |
712 | DRM_DEBUG_KMS("src[%d]dst[%d]\n", src, dst); | 712 | DRM_DEV_DEBUG_KMS(ctx->dev, "src[%d]dst[%d]\n", src, dst); |
713 | 713 | ||
714 | if (src >= dst * 8) { | 714 | if (src >= dst * 8) { |
715 | DRM_DEV_ERROR(ctx->dev, "failed to make ratio and shift.\n"); | 715 | DRM_DEV_ERROR(ctx->dev, "failed to make ratio and shift.\n"); |
@@ -772,19 +772,19 @@ static int gsc_set_prescaler(struct gsc_context *ctx, struct gsc_scaler *sc, | |||
772 | return ret; | 772 | return ret; |
773 | } | 773 | } |
774 | 774 | ||
775 | DRM_DEBUG_KMS("pre_hratio[%d]pre_vratio[%d]\n", | 775 | DRM_DEV_DEBUG_KMS(ctx->dev, "pre_hratio[%d]pre_vratio[%d]\n", |
776 | sc->pre_hratio, sc->pre_vratio); | 776 | sc->pre_hratio, sc->pre_vratio); |
777 | 777 | ||
778 | sc->main_hratio = (src_w << 16) / dst_w; | 778 | sc->main_hratio = (src_w << 16) / dst_w; |
779 | sc->main_vratio = (src_h << 16) / dst_h; | 779 | sc->main_vratio = (src_h << 16) / dst_h; |
780 | 780 | ||
781 | DRM_DEBUG_KMS("main_hratio[%ld]main_vratio[%ld]\n", | 781 | DRM_DEV_DEBUG_KMS(ctx->dev, "main_hratio[%ld]main_vratio[%ld]\n", |
782 | sc->main_hratio, sc->main_vratio); | 782 | sc->main_hratio, sc->main_vratio); |
783 | 783 | ||
784 | gsc_get_prescaler_shfactor(sc->pre_hratio, sc->pre_vratio, | 784 | gsc_get_prescaler_shfactor(sc->pre_hratio, sc->pre_vratio, |
785 | &sc->pre_shfactor); | 785 | &sc->pre_shfactor); |
786 | 786 | ||
787 | DRM_DEBUG_KMS("pre_shfactor[%d]\n", sc->pre_shfactor); | 787 | DRM_DEV_DEBUG_KMS(ctx->dev, "pre_shfactor[%d]\n", sc->pre_shfactor); |
788 | 788 | ||
789 | cfg = (GSC_PRESC_SHFACTOR(sc->pre_shfactor) | | 789 | cfg = (GSC_PRESC_SHFACTOR(sc->pre_shfactor) | |
790 | GSC_PRESC_H_RATIO(sc->pre_hratio) | | 790 | GSC_PRESC_H_RATIO(sc->pre_hratio) | |
@@ -850,8 +850,8 @@ static void gsc_set_scaler(struct gsc_context *ctx, struct gsc_scaler *sc) | |||
850 | { | 850 | { |
851 | u32 cfg; | 851 | u32 cfg; |
852 | 852 | ||
853 | DRM_DEBUG_KMS("main_hratio[%ld]main_vratio[%ld]\n", | 853 | DRM_DEV_DEBUG_KMS(ctx->dev, "main_hratio[%ld]main_vratio[%ld]\n", |
854 | sc->main_hratio, sc->main_vratio); | 854 | sc->main_hratio, sc->main_vratio); |
855 | 855 | ||
856 | gsc_set_h_coef(ctx, sc->main_hratio); | 856 | gsc_set_h_coef(ctx, sc->main_hratio); |
857 | cfg = GSC_MAIN_H_RATIO_VALUE(sc->main_hratio); | 857 | cfg = GSC_MAIN_H_RATIO_VALUE(sc->main_hratio); |
@@ -917,7 +917,7 @@ static int gsc_dst_get_buf_seq(struct gsc_context *ctx) | |||
917 | if (cfg & (mask << i)) | 917 | if (cfg & (mask << i)) |
918 | buf_num--; | 918 | buf_num--; |
919 | 919 | ||
920 | DRM_DEBUG_KMS("buf_num[%d]\n", buf_num); | 920 | DRM_DEV_DEBUG_KMS(ctx->dev, "buf_num[%d]\n", buf_num); |
921 | 921 | ||
922 | return buf_num; | 922 | return buf_num; |
923 | } | 923 | } |
@@ -964,7 +964,7 @@ static int gsc_get_src_buf_index(struct gsc_context *ctx) | |||
964 | u32 cfg, curr_index, i; | 964 | u32 cfg, curr_index, i; |
965 | u32 buf_id = GSC_MAX_SRC; | 965 | u32 buf_id = GSC_MAX_SRC; |
966 | 966 | ||
967 | DRM_DEBUG_KMS("gsc id[%d]\n", ctx->id); | 967 | DRM_DEV_DEBUG_KMS(ctx->dev, "gsc id[%d]\n", ctx->id); |
968 | 968 | ||
969 | cfg = gsc_read(GSC_IN_BASE_ADDR_Y_MASK); | 969 | cfg = gsc_read(GSC_IN_BASE_ADDR_Y_MASK); |
970 | curr_index = GSC_IN_CURR_GET_INDEX(cfg); | 970 | curr_index = GSC_IN_CURR_GET_INDEX(cfg); |
@@ -976,8 +976,8 @@ static int gsc_get_src_buf_index(struct gsc_context *ctx) | |||
976 | } | 976 | } |
977 | } | 977 | } |
978 | 978 | ||
979 | DRM_DEBUG_KMS("cfg[0x%x]curr_index[%d]buf_id[%d]\n", cfg, | 979 | DRM_DEV_DEBUG_KMS(ctx->dev, "cfg[0x%x]curr_index[%d]buf_id[%d]\n", cfg, |
980 | curr_index, buf_id); | 980 | curr_index, buf_id); |
981 | 981 | ||
982 | if (buf_id == GSC_MAX_SRC) { | 982 | if (buf_id == GSC_MAX_SRC) { |
983 | DRM_DEV_ERROR(ctx->dev, "failed to get in buffer index.\n"); | 983 | DRM_DEV_ERROR(ctx->dev, "failed to get in buffer index.\n"); |
@@ -994,7 +994,7 @@ static int gsc_get_dst_buf_index(struct gsc_context *ctx) | |||
994 | u32 cfg, curr_index, i; | 994 | u32 cfg, curr_index, i; |
995 | u32 buf_id = GSC_MAX_DST; | 995 | u32 buf_id = GSC_MAX_DST; |
996 | 996 | ||
997 | DRM_DEBUG_KMS("gsc id[%d]\n", ctx->id); | 997 | DRM_DEV_DEBUG_KMS(ctx->dev, "gsc id[%d]\n", ctx->id); |
998 | 998 | ||
999 | cfg = gsc_read(GSC_OUT_BASE_ADDR_Y_MASK); | 999 | cfg = gsc_read(GSC_OUT_BASE_ADDR_Y_MASK); |
1000 | curr_index = GSC_OUT_CURR_GET_INDEX(cfg); | 1000 | curr_index = GSC_OUT_CURR_GET_INDEX(cfg); |
@@ -1013,8 +1013,8 @@ static int gsc_get_dst_buf_index(struct gsc_context *ctx) | |||
1013 | 1013 | ||
1014 | gsc_dst_set_buf_seq(ctx, buf_id, false); | 1014 | gsc_dst_set_buf_seq(ctx, buf_id, false); |
1015 | 1015 | ||
1016 | DRM_DEBUG_KMS("cfg[0x%x]curr_index[%d]buf_id[%d]\n", cfg, | 1016 | DRM_DEV_DEBUG_KMS(ctx->dev, "cfg[0x%x]curr_index[%d]buf_id[%d]\n", cfg, |
1017 | curr_index, buf_id); | 1017 | curr_index, buf_id); |
1018 | 1018 | ||
1019 | return buf_id; | 1019 | return buf_id; |
1020 | } | 1020 | } |
@@ -1025,7 +1025,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id) | |||
1025 | u32 status; | 1025 | u32 status; |
1026 | int err = 0; | 1026 | int err = 0; |
1027 | 1027 | ||
1028 | DRM_DEBUG_KMS("gsc id[%d]\n", ctx->id); | 1028 | DRM_DEV_DEBUG_KMS(ctx->dev, "gsc id[%d]\n", ctx->id); |
1029 | 1029 | ||
1030 | status = gsc_read(GSC_IRQ); | 1030 | status = gsc_read(GSC_IRQ); |
1031 | if (status & GSC_IRQ_STATUS_OR_IRQ) { | 1031 | if (status & GSC_IRQ_STATUS_OR_IRQ) { |
@@ -1043,8 +1043,8 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id) | |||
1043 | src_buf_id = gsc_get_src_buf_index(ctx); | 1043 | src_buf_id = gsc_get_src_buf_index(ctx); |
1044 | dst_buf_id = gsc_get_dst_buf_index(ctx); | 1044 | dst_buf_id = gsc_get_dst_buf_index(ctx); |
1045 | 1045 | ||
1046 | DRM_DEBUG_KMS("buf_id_src[%d]buf_id_dst[%d]\n", src_buf_id, | 1046 | DRM_DEV_DEBUG_KMS(ctx->dev, "buf_id_src[%d]buf_id_dst[%d]\n", |
1047 | dst_buf_id); | 1047 | src_buf_id, dst_buf_id); |
1048 | 1048 | ||
1049 | if (src_buf_id < 0 || dst_buf_id < 0) | 1049 | if (src_buf_id < 0 || dst_buf_id < 0) |
1050 | err = -EINVAL; | 1050 | err = -EINVAL; |
@@ -1325,7 +1325,7 @@ static int __maybe_unused gsc_runtime_suspend(struct device *dev) | |||
1325 | struct gsc_context *ctx = get_gsc_context(dev); | 1325 | struct gsc_context *ctx = get_gsc_context(dev); |
1326 | int i; | 1326 | int i; |
1327 | 1327 | ||
1328 | DRM_DEBUG_KMS("id[%d]\n", ctx->id); | 1328 | DRM_DEV_DEBUG_KMS(dev, "id[%d]\n", ctx->id); |
1329 | 1329 | ||
1330 | for (i = ctx->num_clocks - 1; i >= 0; i--) | 1330 | for (i = ctx->num_clocks - 1; i >= 0; i--) |
1331 | clk_disable_unprepare(ctx->clocks[i]); | 1331 | clk_disable_unprepare(ctx->clocks[i]); |
@@ -1338,7 +1338,7 @@ static int __maybe_unused gsc_runtime_resume(struct device *dev) | |||
1338 | struct gsc_context *ctx = get_gsc_context(dev); | 1338 | struct gsc_context *ctx = get_gsc_context(dev); |
1339 | int i, ret; | 1339 | int i, ret; |
1340 | 1340 | ||
1341 | DRM_DEBUG_KMS("id[%d]\n", ctx->id); | 1341 | DRM_DEV_DEBUG_KMS(dev, "id[%d]\n", ctx->id); |
1342 | 1342 | ||
1343 | for (i = 0; i < ctx->num_clocks; i++) { | 1343 | for (i = 0; i < ctx->num_clocks; i++) { |
1344 | ret = clk_prepare_enable(ctx->clocks[i]); | 1344 | ret = clk_prepare_enable(ctx->clocks[i]); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index 23226a0212e8..a1ee5416927d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c | |||
@@ -67,7 +67,7 @@ int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, | |||
67 | list_add_tail(&ipp->head, &ipp_list); | 67 | list_add_tail(&ipp->head, &ipp_list); |
68 | ipp->id = num_ipp++; | 68 | ipp->id = num_ipp++; |
69 | 69 | ||
70 | DRM_DEBUG_DRIVER("Registered ipp %d\n", ipp->id); | 70 | DRM_DEV_DEBUG_DRIVER(dev->dev, "Registered ipp %d\n", ipp->id); |
71 | 71 | ||
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
@@ -268,7 +268,7 @@ static inline struct exynos_drm_ipp_task * | |||
268 | task->src.rect.h = task->dst.rect.h = UINT_MAX; | 268 | task->src.rect.h = task->dst.rect.h = UINT_MAX; |
269 | task->transform.rotation = DRM_MODE_ROTATE_0; | 269 | task->transform.rotation = DRM_MODE_ROTATE_0; |
270 | 270 | ||
271 | DRM_DEBUG_DRIVER("Allocated task %pK\n", task); | 271 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Allocated task %pK\n", task); |
272 | 272 | ||
273 | return task; | 273 | return task; |
274 | } | 274 | } |
@@ -335,7 +335,9 @@ static int exynos_drm_ipp_task_set(struct exynos_drm_ipp_task *task, | |||
335 | size -= map[i].size; | 335 | size -= map[i].size; |
336 | } | 336 | } |
337 | 337 | ||
338 | DRM_DEBUG_DRIVER("Got task %pK configuration from userspace\n", task); | 338 | DRM_DEV_DEBUG_DRIVER(task->dev->dev, |
339 | "Got task %pK configuration from userspace\n", | ||
340 | task); | ||
339 | return 0; | 341 | return 0; |
340 | } | 342 | } |
341 | 343 | ||
@@ -389,7 +391,7 @@ static void exynos_drm_ipp_task_release_buf(struct exynos_drm_ipp_buffer *buf) | |||
389 | static void exynos_drm_ipp_task_free(struct exynos_drm_ipp *ipp, | 391 | static void exynos_drm_ipp_task_free(struct exynos_drm_ipp *ipp, |
390 | struct exynos_drm_ipp_task *task) | 392 | struct exynos_drm_ipp_task *task) |
391 | { | 393 | { |
392 | DRM_DEBUG_DRIVER("Freeing task %pK\n", task); | 394 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Freeing task %pK\n", task); |
393 | 395 | ||
394 | exynos_drm_ipp_task_release_buf(&task->src); | 396 | exynos_drm_ipp_task_release_buf(&task->src); |
395 | exynos_drm_ipp_task_release_buf(&task->dst); | 397 | exynos_drm_ipp_task_release_buf(&task->dst); |
@@ -553,8 +555,9 @@ static int exynos_drm_ipp_check_format(struct exynos_drm_ipp_task *task, | |||
553 | buf == src ? DRM_EXYNOS_IPP_FORMAT_SOURCE : | 555 | buf == src ? DRM_EXYNOS_IPP_FORMAT_SOURCE : |
554 | DRM_EXYNOS_IPP_FORMAT_DESTINATION); | 556 | DRM_EXYNOS_IPP_FORMAT_DESTINATION); |
555 | if (!fmt) { | 557 | if (!fmt) { |
556 | DRM_DEBUG_DRIVER("Task %pK: %s format not supported\n", task, | 558 | DRM_DEV_DEBUG_DRIVER(task->dev->dev, |
557 | buf == src ? "src" : "dst"); | 559 | "Task %pK: %s format not supported\n", |
560 | task, buf == src ? "src" : "dst"); | ||
558 | return -EINVAL; | 561 | return -EINVAL; |
559 | } | 562 | } |
560 | 563 | ||
@@ -603,7 +606,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) | |||
603 | bool rotate = (rotation != DRM_MODE_ROTATE_0); | 606 | bool rotate = (rotation != DRM_MODE_ROTATE_0); |
604 | bool scale = false; | 607 | bool scale = false; |
605 | 608 | ||
606 | DRM_DEBUG_DRIVER("Checking task %pK\n", task); | 609 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Checking task %pK\n", task); |
607 | 610 | ||
608 | if (src->rect.w == UINT_MAX) | 611 | if (src->rect.w == UINT_MAX) |
609 | src->rect.w = src->buf.width; | 612 | src->rect.w = src->buf.width; |
@@ -618,8 +621,9 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) | |||
618 | src->rect.y + src->rect.h > (src->buf.height) || | 621 | src->rect.y + src->rect.h > (src->buf.height) || |
619 | dst->rect.x + dst->rect.w > (dst->buf.width) || | 622 | dst->rect.x + dst->rect.w > (dst->buf.width) || |
620 | dst->rect.y + dst->rect.h > (dst->buf.height)) { | 623 | dst->rect.y + dst->rect.h > (dst->buf.height)) { |
621 | DRM_DEBUG_DRIVER("Task %pK: defined area is outside provided buffers\n", | 624 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, |
622 | task); | 625 | "Task %pK: defined area is outside provided buffers\n", |
626 | task); | ||
623 | return -EINVAL; | 627 | return -EINVAL; |
624 | } | 628 | } |
625 | 629 | ||
@@ -635,7 +639,8 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) | |||
635 | (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_SCALE) && scale) || | 639 | (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_SCALE) && scale) || |
636 | (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_CONVERT) && | 640 | (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_CONVERT) && |
637 | src->buf.fourcc != dst->buf.fourcc)) { | 641 | src->buf.fourcc != dst->buf.fourcc)) { |
638 | DRM_DEBUG_DRIVER("Task %pK: hw capabilities exceeded\n", task); | 642 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Task %pK: hw capabilities exceeded\n", |
643 | task); | ||
639 | return -EINVAL; | 644 | return -EINVAL; |
640 | } | 645 | } |
641 | 646 | ||
@@ -647,7 +652,8 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) | |||
647 | if (ret) | 652 | if (ret) |
648 | return ret; | 653 | return ret; |
649 | 654 | ||
650 | DRM_DEBUG_DRIVER("Task %pK: all checks done.\n", task); | 655 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Task %pK: all checks done.\n", |
656 | task); | ||
651 | 657 | ||
652 | return ret; | 658 | return ret; |
653 | } | 659 | } |
@@ -658,20 +664,26 @@ static int exynos_drm_ipp_task_setup_buffers(struct exynos_drm_ipp_task *task, | |||
658 | struct exynos_drm_ipp_buffer *src = &task->src, *dst = &task->dst; | 664 | struct exynos_drm_ipp_buffer *src = &task->src, *dst = &task->dst; |
659 | int ret = 0; | 665 | int ret = 0; |
660 | 666 | ||
661 | DRM_DEBUG_DRIVER("Setting buffer for task %pK\n", task); | 667 | DRM_DEV_DEBUG_DRIVER(task->dev->dev, "Setting buffer for task %pK\n", |
668 | task); | ||
662 | 669 | ||
663 | ret = exynos_drm_ipp_task_setup_buffer(src, filp); | 670 | ret = exynos_drm_ipp_task_setup_buffer(src, filp); |
664 | if (ret) { | 671 | if (ret) { |
665 | DRM_DEBUG_DRIVER("Task %pK: src buffer setup failed\n", task); | 672 | DRM_DEV_DEBUG_DRIVER(task->dev->dev, |
673 | "Task %pK: src buffer setup failed\n", | ||
674 | task); | ||
666 | return ret; | 675 | return ret; |
667 | } | 676 | } |
668 | ret = exynos_drm_ipp_task_setup_buffer(dst, filp); | 677 | ret = exynos_drm_ipp_task_setup_buffer(dst, filp); |
669 | if (ret) { | 678 | if (ret) { |
670 | DRM_DEBUG_DRIVER("Task %pK: dst buffer setup failed\n", task); | 679 | DRM_DEV_DEBUG_DRIVER(task->dev->dev, |
680 | "Task %pK: dst buffer setup failed\n", | ||
681 | task); | ||
671 | return ret; | 682 | return ret; |
672 | } | 683 | } |
673 | 684 | ||
674 | DRM_DEBUG_DRIVER("Task %pK: buffers prepared.\n", task); | 685 | DRM_DEV_DEBUG_DRIVER(task->dev->dev, "Task %pK: buffers prepared.\n", |
686 | task); | ||
675 | 687 | ||
676 | return ret; | 688 | return ret; |
677 | } | 689 | } |
@@ -749,7 +761,8 @@ void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret) | |||
749 | struct exynos_drm_ipp *ipp = task->ipp; | 761 | struct exynos_drm_ipp *ipp = task->ipp; |
750 | unsigned long flags; | 762 | unsigned long flags; |
751 | 763 | ||
752 | DRM_DEBUG_DRIVER("ipp: %d, task %pK done: %d\n", ipp->id, task, ret); | 764 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "ipp: %d, task %pK done: %d\n", |
765 | ipp->id, task, ret); | ||
753 | 766 | ||
754 | spin_lock_irqsave(&ipp->lock, flags); | 767 | spin_lock_irqsave(&ipp->lock, flags); |
755 | if (ipp->task == task) | 768 | if (ipp->task == task) |
@@ -773,7 +786,8 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp) | |||
773 | unsigned long flags; | 786 | unsigned long flags; |
774 | int ret; | 787 | int ret; |
775 | 788 | ||
776 | DRM_DEBUG_DRIVER("ipp: %d, try to run new task\n", ipp->id); | 789 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "ipp: %d, try to run new task\n", |
790 | ipp->id); | ||
777 | 791 | ||
778 | spin_lock_irqsave(&ipp->lock, flags); | 792 | spin_lock_irqsave(&ipp->lock, flags); |
779 | 793 | ||
@@ -789,7 +803,9 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp) | |||
789 | 803 | ||
790 | spin_unlock_irqrestore(&ipp->lock, flags); | 804 | spin_unlock_irqrestore(&ipp->lock, flags); |
791 | 805 | ||
792 | DRM_DEBUG_DRIVER("ipp: %d, selected task %pK to run\n", ipp->id, task); | 806 | DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, |
807 | "ipp: %d, selected task %pK to run\n", ipp->id, | ||
808 | task); | ||
793 | 809 | ||
794 | ret = ipp->funcs->commit(ipp, task); | 810 | ret = ipp->funcs->commit(ipp, task); |
795 | if (ret) | 811 | if (ret) |
@@ -897,15 +913,16 @@ int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data, | |||
897 | * then freed after exynos_drm_ipp_task_done() | 913 | * then freed after exynos_drm_ipp_task_done() |
898 | */ | 914 | */ |
899 | if (arg->flags & DRM_EXYNOS_IPP_FLAG_NONBLOCK) { | 915 | if (arg->flags & DRM_EXYNOS_IPP_FLAG_NONBLOCK) { |
900 | DRM_DEBUG_DRIVER("ipp: %d, nonblocking processing task %pK\n", | 916 | DRM_DEV_DEBUG_DRIVER(dev->dev, |
901 | ipp->id, task); | 917 | "ipp: %d, nonblocking processing task %pK\n", |
918 | ipp->id, task); | ||
902 | 919 | ||
903 | task->flags |= DRM_EXYNOS_IPP_TASK_ASYNC; | 920 | task->flags |= DRM_EXYNOS_IPP_TASK_ASYNC; |
904 | exynos_drm_ipp_schedule_task(task->ipp, task); | 921 | exynos_drm_ipp_schedule_task(task->ipp, task); |
905 | ret = 0; | 922 | ret = 0; |
906 | } else { | 923 | } else { |
907 | DRM_DEBUG_DRIVER("ipp: %d, processing task %pK\n", ipp->id, | 924 | DRM_DEV_DEBUG_DRIVER(dev->dev, "ipp: %d, processing task %pK\n", |
908 | task); | 925 | ipp->id, task); |
909 | exynos_drm_ipp_schedule_task(ipp, task); | 926 | exynos_drm_ipp_schedule_task(ipp, task); |
910 | ret = wait_event_interruptible(ipp->done_wq, | 927 | ret = wait_event_interruptible(ipp->done_wq, |
911 | task->flags & DRM_EXYNOS_IPP_TASK_DONE); | 928 | task->flags & DRM_EXYNOS_IPP_TASK_DONE); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index ddf5b4dfd6c3..d1c8411ae7d4 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c | |||
@@ -192,7 +192,7 @@ static void mic_set_output_timing(struct exynos_mic *mic) | |||
192 | struct videomode vm = mic->vm; | 192 | struct videomode vm = mic->vm; |
193 | u32 reg, bs_size_2d; | 193 | u32 reg, bs_size_2d; |
194 | 194 | ||
195 | DRM_DEBUG("w: %u, h: %u\n", vm.hactive, vm.vactive); | 195 | DRM_DEV_DEBUG(mic->dev, "w: %u, h: %u\n", vm.hactive, vm.vactive); |
196 | bs_size_2d = ((vm.hactive >> 2) << 1) + (vm.vactive % 4); | 196 | bs_size_2d = ((vm.hactive >> 2) << 1) + (vm.vactive % 4); |
197 | reg = MIC_BS_SIZE_2D(bs_size_2d); | 197 | reg = MIC_BS_SIZE_2D(bs_size_2d); |
198 | writel(reg, mic->reg + MIC_2D_OUTPUT_TIMING_2); | 198 | writel(reg, mic->reg + MIC_2D_OUTPUT_TIMING_2); |
@@ -433,7 +433,7 @@ static int exynos_mic_probe(struct platform_device *pdev) | |||
433 | if (ret) | 433 | if (ret) |
434 | goto err_pm; | 434 | goto err_pm; |
435 | 435 | ||
436 | DRM_DEBUG_KMS("MIC has been probed\n"); | 436 | DRM_DEV_DEBUG_KMS(dev, "MIC has been probed\n"); |
437 | 437 | ||
438 | return 0; | 438 | return 0; |
439 | 439 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index 6328565f889e..e18babb25170 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c | |||
@@ -119,9 +119,10 @@ static void exynos_plane_mode_set(struct exynos_drm_plane_state *exynos_state) | |||
119 | exynos_state->crtc.w = actual_w; | 119 | exynos_state->crtc.w = actual_w; |
120 | exynos_state->crtc.h = actual_h; | 120 | exynos_state->crtc.h = actual_h; |
121 | 121 | ||
122 | DRM_DEBUG_KMS("plane : offset_x/y(%d,%d), width/height(%d,%d)", | 122 | DRM_DEV_DEBUG_KMS(crtc->dev->dev, |
123 | exynos_state->crtc.x, exynos_state->crtc.y, | 123 | "plane : offset_x/y(%d,%d), width/height(%d,%d)", |
124 | exynos_state->crtc.w, exynos_state->crtc.h); | 124 | exynos_state->crtc.x, exynos_state->crtc.y, |
125 | exynos_state->crtc.w, exynos_state->crtc.h); | ||
125 | } | 126 | } |
126 | 127 | ||
127 | static void exynos_drm_plane_reset(struct drm_plane *plane) | 128 | static void exynos_drm_plane_reset(struct drm_plane *plane) |
@@ -204,6 +205,7 @@ static int | |||
204 | exynos_drm_plane_check_size(const struct exynos_drm_plane_config *config, | 205 | exynos_drm_plane_check_size(const struct exynos_drm_plane_config *config, |
205 | struct exynos_drm_plane_state *state) | 206 | struct exynos_drm_plane_state *state) |
206 | { | 207 | { |
208 | struct drm_crtc *crtc = state->base.crtc; | ||
207 | bool width_ok = false, height_ok = false; | 209 | bool width_ok = false, height_ok = false; |
208 | 210 | ||
209 | if (config->capabilities & EXYNOS_DRM_PLANE_CAP_SCALE) | 211 | if (config->capabilities & EXYNOS_DRM_PLANE_CAP_SCALE) |
@@ -226,7 +228,7 @@ exynos_drm_plane_check_size(const struct exynos_drm_plane_config *config, | |||
226 | if (width_ok && height_ok) | 228 | if (width_ok && height_ok) |
227 | return 0; | 229 | return 0; |
228 | 230 | ||
229 | DRM_DEBUG_KMS("scaling mode is not supported"); | 231 | DRM_DEV_DEBUG_KMS(crtc->dev->dev, "scaling mode is not supported"); |
230 | return -ENOTSUPP; | 232 | return -ENOTSUPP; |
231 | } | 233 | } |
232 | 234 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 302275604b87..08e610cb9a48 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c | |||
@@ -123,7 +123,7 @@ static void vidi_update_plane(struct exynos_drm_crtc *crtc, | |||
123 | return; | 123 | return; |
124 | 124 | ||
125 | addr = exynos_drm_fb_dma_addr(state->fb, 0); | 125 | addr = exynos_drm_fb_dma_addr(state->fb, 0); |
126 | DRM_DEBUG_KMS("dma_addr = %pad\n", &addr); | 126 | DRM_DEV_DEBUG_KMS(&ctx->pdev->dev, "dma_addr = %pad\n", &addr); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void vidi_enable(struct exynos_drm_crtc *crtc) | 129 | static void vidi_enable(struct exynos_drm_crtc *crtc) |
@@ -205,11 +205,11 @@ static ssize_t vidi_store_connection(struct device *dev, | |||
205 | 205 | ||
206 | /* if raw_edid isn't same as fake data then it can't be tested. */ | 206 | /* if raw_edid isn't same as fake data then it can't be tested. */ |
207 | if (ctx->raw_edid != (struct edid *)fake_edid_info) { | 207 | if (ctx->raw_edid != (struct edid *)fake_edid_info) { |
208 | DRM_DEBUG_KMS("edid data is not fake data.\n"); | 208 | DRM_DEV_DEBUG_KMS(dev, "edid data is not fake data.\n"); |
209 | return -EINVAL; | 209 | return -EINVAL; |
210 | } | 210 | } |
211 | 211 | ||
212 | DRM_DEBUG_KMS("requested connection.\n"); | 212 | DRM_DEV_DEBUG_KMS(dev, "requested connection.\n"); |
213 | 213 | ||
214 | drm_helper_hpd_irq_event(ctx->drm_dev); | 214 | drm_helper_hpd_irq_event(ctx->drm_dev); |
215 | 215 | ||
@@ -226,17 +226,20 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data, | |||
226 | struct drm_exynos_vidi_connection *vidi = data; | 226 | struct drm_exynos_vidi_connection *vidi = data; |
227 | 227 | ||
228 | if (!vidi) { | 228 | if (!vidi) { |
229 | DRM_DEBUG_KMS("user data for vidi is null.\n"); | 229 | DRM_DEV_DEBUG_KMS(&ctx->pdev->dev, |
230 | "user data for vidi is null.\n"); | ||
230 | return -EINVAL; | 231 | return -EINVAL; |
231 | } | 232 | } |
232 | 233 | ||
233 | if (vidi->connection > 1) { | 234 | if (vidi->connection > 1) { |
234 | DRM_DEBUG_KMS("connection should be 0 or 1.\n"); | 235 | DRM_DEV_DEBUG_KMS(&ctx->pdev->dev, |
236 | "connection should be 0 or 1.\n"); | ||
235 | return -EINVAL; | 237 | return -EINVAL; |
236 | } | 238 | } |
237 | 239 | ||
238 | if (ctx->connected == vidi->connection) { | 240 | if (ctx->connected == vidi->connection) { |
239 | DRM_DEBUG_KMS("same connection request.\n"); | 241 | DRM_DEV_DEBUG_KMS(&ctx->pdev->dev, |
242 | "same connection request.\n"); | ||
240 | return -EINVAL; | 243 | return -EINVAL; |
241 | } | 244 | } |
242 | 245 | ||
@@ -245,12 +248,14 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data, | |||
245 | 248 | ||
246 | raw_edid = (struct edid *)(unsigned long)vidi->edid; | 249 | raw_edid = (struct edid *)(unsigned long)vidi->edid; |
247 | if (!drm_edid_is_valid(raw_edid)) { | 250 | if (!drm_edid_is_valid(raw_edid)) { |
248 | DRM_DEBUG_KMS("edid data is invalid.\n"); | 251 | DRM_DEV_DEBUG_KMS(&ctx->pdev->dev, |
252 | "edid data is invalid.\n"); | ||
249 | return -EINVAL; | 253 | return -EINVAL; |
250 | } | 254 | } |
251 | ctx->raw_edid = drm_edid_duplicate(raw_edid); | 255 | ctx->raw_edid = drm_edid_duplicate(raw_edid); |
252 | if (!ctx->raw_edid) { | 256 | if (!ctx->raw_edid) { |
253 | DRM_DEBUG_KMS("failed to allocate raw_edid.\n"); | 257 | DRM_DEV_DEBUG_KMS(&ctx->pdev->dev, |
258 | "failed to allocate raw_edid.\n"); | ||
254 | return -ENOMEM; | 259 | return -ENOMEM; |
255 | } | 260 | } |
256 | } else { | 261 | } else { |
@@ -308,14 +313,14 @@ static int vidi_get_modes(struct drm_connector *connector) | |||
308 | * to ctx->raw_edid through specific ioctl. | 313 | * to ctx->raw_edid through specific ioctl. |
309 | */ | 314 | */ |
310 | if (!ctx->raw_edid) { | 315 | if (!ctx->raw_edid) { |
311 | DRM_DEBUG_KMS("raw_edid is null.\n"); | 316 | DRM_DEV_DEBUG_KMS(&ctx->pdev->dev, "raw_edid is null.\n"); |
312 | return -EFAULT; | 317 | return -EFAULT; |
313 | } | 318 | } |
314 | 319 | ||
315 | edid_len = (1 + ctx->raw_edid->extensions) * EDID_LENGTH; | 320 | edid_len = (1 + ctx->raw_edid->extensions) * EDID_LENGTH; |
316 | edid = kmemdup(ctx->raw_edid, edid_len, GFP_KERNEL); | 321 | edid = kmemdup(ctx->raw_edid, edid_len, GFP_KERNEL); |
317 | if (!edid) { | 322 | if (!edid) { |
318 | DRM_DEBUG_KMS("failed to allocate edid\n"); | 323 | DRM_DEV_DEBUG_KMS(&ctx->pdev->dev, "failed to allocate edid\n"); |
319 | return -ENOMEM; | 324 | return -ENOMEM; |
320 | } | 325 | } |
321 | 326 | ||
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index d391e2f6d271..19c252f659dd 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c | |||
@@ -885,9 +885,9 @@ static int hdmi_get_modes(struct drm_connector *connector) | |||
885 | return -ENODEV; | 885 | return -ENODEV; |
886 | 886 | ||
887 | hdata->dvi_mode = !drm_detect_hdmi_monitor(edid); | 887 | hdata->dvi_mode = !drm_detect_hdmi_monitor(edid); |
888 | DRM_DEBUG_KMS("%s : width[%d] x height[%d]\n", | 888 | DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n", |
889 | (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"), | 889 | (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"), |
890 | edid->width_cm, edid->height_cm); | 890 | edid->width_cm, edid->height_cm); |
891 | 891 | ||
892 | drm_connector_update_edid_property(connector, edid); | 892 | drm_connector_update_edid_property(connector, edid); |
893 | cec_notifier_set_phys_addr_from_edid(hdata->notifier, edid); | 893 | cec_notifier_set_phys_addr_from_edid(hdata->notifier, edid); |
@@ -908,7 +908,8 @@ static int hdmi_find_phy_conf(struct hdmi_context *hdata, u32 pixel_clock) | |||
908 | if (confs->data[i].pixel_clock == pixel_clock) | 908 | if (confs->data[i].pixel_clock == pixel_clock) |
909 | return i; | 909 | return i; |
910 | 910 | ||
911 | DRM_DEBUG_KMS("Could not find phy config for %d\n", pixel_clock); | 911 | DRM_DEV_DEBUG_KMS(hdata->dev, "Could not find phy config for %d\n", |
912 | pixel_clock); | ||
912 | return -EINVAL; | 913 | return -EINVAL; |
913 | } | 914 | } |
914 | 915 | ||
@@ -918,10 +919,11 @@ static int hdmi_mode_valid(struct drm_connector *connector, | |||
918 | struct hdmi_context *hdata = connector_to_hdmi(connector); | 919 | struct hdmi_context *hdata = connector_to_hdmi(connector); |
919 | int ret; | 920 | int ret; |
920 | 921 | ||
921 | DRM_DEBUG_KMS("xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n", | 922 | DRM_DEV_DEBUG_KMS(hdata->dev, |
922 | mode->hdisplay, mode->vdisplay, mode->vrefresh, | 923 | "xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n", |
923 | (mode->flags & DRM_MODE_FLAG_INTERLACE) ? true : | 924 | mode->hdisplay, mode->vdisplay, mode->vrefresh, |
924 | false, mode->clock * 1000); | 925 | (mode->flags & DRM_MODE_FLAG_INTERLACE) ? true : |
926 | false, mode->clock * 1000); | ||
925 | 927 | ||
926 | ret = hdmi_find_phy_conf(hdata, mode->clock * 1000); | 928 | ret = hdmi_find_phy_conf(hdata, mode->clock * 1000); |
927 | if (ret < 0) | 929 | if (ret < 0) |
@@ -1003,8 +1005,10 @@ static bool hdmi_mode_fixup(struct drm_encoder *encoder, | |||
1003 | DRM_INFO("desired mode doesn't exist so\n"); | 1005 | DRM_INFO("desired mode doesn't exist so\n"); |
1004 | DRM_INFO("use the most suitable mode among modes.\n"); | 1006 | DRM_INFO("use the most suitable mode among modes.\n"); |
1005 | 1007 | ||
1006 | DRM_DEBUG_KMS("Adjusted Mode: [%d]x[%d] [%d]Hz\n", | 1008 | DRM_DEV_DEBUG_KMS(dev->dev, |
1007 | m->hdisplay, m->vdisplay, m->vrefresh); | 1009 | "Adjusted Mode: [%d]x[%d] [%d]Hz\n", |
1010 | m->hdisplay, m->vdisplay, | ||
1011 | m->vrefresh); | ||
1008 | 1012 | ||
1009 | drm_mode_copy(adjusted_mode, m); | 1013 | drm_mode_copy(adjusted_mode, m); |
1010 | break; | 1014 | break; |
@@ -1170,7 +1174,9 @@ static void hdmiphy_wait_for_pll(struct hdmi_context *hdata) | |||
1170 | u32 val = hdmi_reg_read(hdata, HDMI_PHY_STATUS); | 1174 | u32 val = hdmi_reg_read(hdata, HDMI_PHY_STATUS); |
1171 | 1175 | ||
1172 | if (val & HDMI_PHY_STATUS_READY) { | 1176 | if (val & HDMI_PHY_STATUS_READY) { |
1173 | DRM_DEBUG_KMS("PLL stabilized after %d tries\n", tries); | 1177 | DRM_DEV_DEBUG_KMS(hdata->dev, |
1178 | "PLL stabilized after %d tries\n", | ||
1179 | tries); | ||
1174 | return; | 1180 | return; |
1175 | } | 1181 | } |
1176 | usleep_range(10, 20); | 1182 | usleep_range(10, 20); |
@@ -1461,7 +1467,8 @@ static void hdmiphy_enable(struct hdmi_context *hdata) | |||
1461 | pm_runtime_get_sync(hdata->dev); | 1467 | pm_runtime_get_sync(hdata->dev); |
1462 | 1468 | ||
1463 | if (regulator_bulk_enable(ARRAY_SIZE(supply), hdata->regul_bulk)) | 1469 | if (regulator_bulk_enable(ARRAY_SIZE(supply), hdata->regul_bulk)) |
1464 | DRM_DEBUG_KMS("failed to enable regulator bulk\n"); | 1470 | DRM_DEV_DEBUG_KMS(hdata->dev, |
1471 | "failed to enable regulator bulk\n"); | ||
1465 | 1472 | ||
1466 | regmap_update_bits(hdata->pmureg, PMU_HDMI_PHY_CONTROL, | 1473 | regmap_update_bits(hdata->pmureg, PMU_HDMI_PHY_CONTROL, |
1467 | PMU_HDMI_PHY_ENABLE_BIT, 1); | 1474 | PMU_HDMI_PHY_ENABLE_BIT, 1); |
@@ -1753,7 +1760,7 @@ static int hdmi_resources_init(struct hdmi_context *hdata) | |||
1753 | struct device *dev = hdata->dev; | 1760 | struct device *dev = hdata->dev; |
1754 | int i, ret; | 1761 | int i, ret; |
1755 | 1762 | ||
1756 | DRM_DEBUG_KMS("HDMI resource init\n"); | 1763 | DRM_DEV_DEBUG_KMS(dev, "HDMI resource init\n"); |
1757 | 1764 | ||
1758 | hdata->hpd_gpio = devm_gpiod_get(dev, "hpd", GPIOD_IN); | 1765 | hdata->hpd_gpio = devm_gpiod_get(dev, "hpd", GPIOD_IN); |
1759 | if (IS_ERR(hdata->hpd_gpio)) { | 1766 | if (IS_ERR(hdata->hpd_gpio)) { |
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 9bda3d4bd17a..b8415e53964d 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
@@ -228,8 +228,8 @@ static void mixer_regs_dump(struct mixer_context *ctx) | |||
228 | { | 228 | { |
229 | #define DUMPREG(reg_id) \ | 229 | #define DUMPREG(reg_id) \ |
230 | do { \ | 230 | do { \ |
231 | DRM_DEBUG_KMS(#reg_id " = %08x\n", \ | 231 | DRM_DEV_DEBUG_KMS(ctx->dev, #reg_id " = %08x\n", \ |
232 | (u32)readl(ctx->mixer_regs + reg_id)); \ | 232 | (u32)readl(ctx->mixer_regs + reg_id)); \ |
233 | } while (0) | 233 | } while (0) |
234 | 234 | ||
235 | DUMPREG(MXR_STATUS); | 235 | DUMPREG(MXR_STATUS); |
@@ -260,8 +260,8 @@ static void vp_regs_dump(struct mixer_context *ctx) | |||
260 | { | 260 | { |
261 | #define DUMPREG(reg_id) \ | 261 | #define DUMPREG(reg_id) \ |
262 | do { \ | 262 | do { \ |
263 | DRM_DEBUG_KMS(#reg_id " = %08x\n", \ | 263 | DRM_DEV_DEBUG_KMS(ctx->dev, #reg_id " = %08x\n", \ |
264 | (u32) readl(ctx->vp_regs + reg_id)); \ | 264 | (u32) readl(ctx->vp_regs + reg_id)); \ |
265 | } while (0) | 265 | } while (0) |
266 | 266 | ||
267 | DUMPREG(VP_ENABLE); | 267 | DUMPREG(VP_ENABLE); |
@@ -954,7 +954,7 @@ static void mixer_update_plane(struct exynos_drm_crtc *crtc, | |||
954 | { | 954 | { |
955 | struct mixer_context *mixer_ctx = crtc->ctx; | 955 | struct mixer_context *mixer_ctx = crtc->ctx; |
956 | 956 | ||
957 | DRM_DEBUG_KMS("win: %d\n", plane->index); | 957 | DRM_DEV_DEBUG_KMS(mixer_ctx->dev, "win: %d\n", plane->index); |
958 | 958 | ||
959 | if (!test_bit(MXR_BIT_POWERED, &mixer_ctx->flags)) | 959 | if (!test_bit(MXR_BIT_POWERED, &mixer_ctx->flags)) |
960 | return; | 960 | return; |
@@ -971,7 +971,7 @@ static void mixer_disable_plane(struct exynos_drm_crtc *crtc, | |||
971 | struct mixer_context *mixer_ctx = crtc->ctx; | 971 | struct mixer_context *mixer_ctx = crtc->ctx; |
972 | unsigned long flags; | 972 | unsigned long flags; |
973 | 973 | ||
974 | DRM_DEBUG_KMS("win: %d\n", plane->index); | 974 | DRM_DEV_DEBUG_KMS(mixer_ctx->dev, "win: %d\n", plane->index); |
975 | 975 | ||
976 | if (!test_bit(MXR_BIT_POWERED, &mixer_ctx->flags)) | 976 | if (!test_bit(MXR_BIT_POWERED, &mixer_ctx->flags)) |
977 | return; | 977 | return; |
@@ -1048,8 +1048,9 @@ static int mixer_mode_valid(struct exynos_drm_crtc *crtc, | |||
1048 | struct mixer_context *ctx = crtc->ctx; | 1048 | struct mixer_context *ctx = crtc->ctx; |
1049 | u32 w = mode->hdisplay, h = mode->vdisplay; | 1049 | u32 w = mode->hdisplay, h = mode->vdisplay; |
1050 | 1050 | ||
1051 | DRM_DEBUG_KMS("xres=%d, yres=%d, refresh=%d, intl=%d\n", w, h, | 1051 | DRM_DEV_DEBUG_KMS(ctx->dev, "xres=%d, yres=%d, refresh=%d, intl=%d\n", |
1052 | mode->vrefresh, !!(mode->flags & DRM_MODE_FLAG_INTERLACE)); | 1052 | w, h, mode->vrefresh, |
1053 | !!(mode->flags & DRM_MODE_FLAG_INTERLACE)); | ||
1053 | 1054 | ||
1054 | if (ctx->mxr_ver == MXR_VER_128_0_0_184) | 1055 | if (ctx->mxr_ver == MXR_VER_128_0_0_184) |
1055 | return MODE_OK; | 1056 | return MODE_OK; |