aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoungJun Cho <yj44.cho@samsung.com>2013-06-11 21:44:40 -0400
committerInki Dae <daeinki@gmail.com>2013-06-28 08:13:56 -0400
commitcbc4c33d14ceefe99372065cb5733101401c08a2 (patch)
treeeda6bfefdd81615e05b5beee48bcf28d0c5f8b3f
parentbca34c9a40e503e9bc6bafa45819dd55c2fd3e20 (diff)
drm/exynos: Clean up logs for DRM_ERROR / DRM_DEBUG_KMS
This patch cleans up logs for DRM_ERROR / DRM_DEBUG_KMS to avoid logging duplicated function name because the macros already contain __func__. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimc.c113
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gsc.c90
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.c149
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_rotator.c41
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c10
-rw-r--r--drivers/gpu/drm/exynos/exynos_mixer.c8
6 files changed, 187 insertions, 224 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 7b5f2e8f0861..61b094f689a7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -217,7 +217,7 @@ static void fimc_set_type_ctrl(struct fimc_context *ctx, enum fimc_wb wb)
217{ 217{
218 u32 cfg; 218 u32 cfg;
219 219
220 DRM_DEBUG_KMS("%s:wb[%d]\n", __func__, wb); 220 DRM_DEBUG_KMS("wb[%d]\n", wb);
221 221
222 cfg = fimc_read(EXYNOS_CIGCTRL); 222 cfg = fimc_read(EXYNOS_CIGCTRL);
223 cfg &= ~(EXYNOS_CIGCTRL_TESTPATTERN_MASK | 223 cfg &= ~(EXYNOS_CIGCTRL_TESTPATTERN_MASK |
@@ -253,10 +253,10 @@ static void fimc_set_polarity(struct fimc_context *ctx,
253{ 253{
254 u32 cfg; 254 u32 cfg;
255 255
256 DRM_DEBUG_KMS("%s:inv_pclk[%d]inv_vsync[%d]\n", 256 DRM_DEBUG_KMS("inv_pclk[%d]inv_vsync[%d]\n",
257 __func__, pol->inv_pclk, pol->inv_vsync); 257 pol->inv_pclk, pol->inv_vsync);
258 DRM_DEBUG_KMS("%s:inv_href[%d]inv_hsync[%d]\n", 258 DRM_DEBUG_KMS("inv_href[%d]inv_hsync[%d]\n",
259 __func__, pol->inv_href, pol->inv_hsync); 259 pol->inv_href, pol->inv_hsync);
260 260
261 cfg = fimc_read(EXYNOS_CIGCTRL); 261 cfg = fimc_read(EXYNOS_CIGCTRL);
262 cfg &= ~(EXYNOS_CIGCTRL_INVPOLPCLK | EXYNOS_CIGCTRL_INVPOLVSYNC | 262 cfg &= ~(EXYNOS_CIGCTRL_INVPOLPCLK | EXYNOS_CIGCTRL_INVPOLVSYNC |
@@ -278,7 +278,7 @@ static void fimc_handle_jpeg(struct fimc_context *ctx, bool enable)
278{ 278{
279 u32 cfg; 279 u32 cfg;
280 280
281 DRM_DEBUG_KMS("%s:enable[%d]\n", __func__, enable); 281 DRM_DEBUG_KMS("enable[%d]\n", enable);
282 282
283 cfg = fimc_read(EXYNOS_CIGCTRL); 283 cfg = fimc_read(EXYNOS_CIGCTRL);
284 if (enable) 284 if (enable)
@@ -294,7 +294,7 @@ static void fimc_handle_irq(struct fimc_context *ctx, bool enable,
294{ 294{
295 u32 cfg; 295 u32 cfg;
296 296
297 DRM_DEBUG_KMS("%s:enable[%d]overflow[%d]level[%d]\n", __func__, 297 DRM_DEBUG_KMS("enable[%d]overflow[%d]level[%d]\n",
298 enable, overflow, level); 298 enable, overflow, level);
299 299
300 cfg = fimc_read(EXYNOS_CIGCTRL); 300 cfg = fimc_read(EXYNOS_CIGCTRL);
@@ -329,7 +329,7 @@ static bool fimc_check_ovf(struct fimc_context *ctx)
329 flag = EXYNOS_CISTATUS_OVFIY | EXYNOS_CISTATUS_OVFICB | 329 flag = EXYNOS_CISTATUS_OVFIY | EXYNOS_CISTATUS_OVFICB |
330 EXYNOS_CISTATUS_OVFICR; 330 EXYNOS_CISTATUS_OVFICR;
331 331
332 DRM_DEBUG_KMS("%s:flag[0x%x]\n", __func__, flag); 332 DRM_DEBUG_KMS("flag[0x%x]\n", flag);
333 333
334 if (status & flag) { 334 if (status & flag) {
335 cfg = fimc_read(EXYNOS_CIWDOFST); 335 cfg = fimc_read(EXYNOS_CIWDOFST);
@@ -358,7 +358,7 @@ static bool fimc_check_frame_end(struct fimc_context *ctx)
358 358
359 cfg = fimc_read(EXYNOS_CISTATUS); 359 cfg = fimc_read(EXYNOS_CISTATUS);
360 360
361 DRM_DEBUG_KMS("%s:cfg[0x%x]\n", __func__, cfg); 361 DRM_DEBUG_KMS("cfg[0x%x]\n", cfg);
362 362
363 if (!(cfg & EXYNOS_CISTATUS_FRAMEEND)) 363 if (!(cfg & EXYNOS_CISTATUS_FRAMEEND))
364 return false; 364 return false;
@@ -380,7 +380,7 @@ static int fimc_get_buf_id(struct fimc_context *ctx)
380 if (frame_cnt == 0) 380 if (frame_cnt == 0)
381 frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg); 381 frame_cnt = EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg);
382 382
383 DRM_DEBUG_KMS("%s:present[%d]before[%d]\n", __func__, 383 DRM_DEBUG_KMS("present[%d]before[%d]\n",
384 EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg), 384 EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(cfg),
385 EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg)); 385 EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(cfg));
386 386
@@ -390,7 +390,7 @@ static int fimc_get_buf_id(struct fimc_context *ctx)
390 } 390 }
391 391
392 buf_id = frame_cnt - 1; 392 buf_id = frame_cnt - 1;
393 DRM_DEBUG_KMS("%s:buf_id[%d]\n", __func__, buf_id); 393 DRM_DEBUG_KMS("buf_id[%d]\n", buf_id);
394 394
395 return buf_id; 395 return buf_id;
396} 396}
@@ -399,7 +399,7 @@ static void fimc_handle_lastend(struct fimc_context *ctx, bool enable)
399{ 399{
400 u32 cfg; 400 u32 cfg;
401 401
402 DRM_DEBUG_KMS("%s:enable[%d]\n", __func__, enable); 402 DRM_DEBUG_KMS("enable[%d]\n", enable);
403 403
404 cfg = fimc_read(EXYNOS_CIOCTRL); 404 cfg = fimc_read(EXYNOS_CIOCTRL);
405 if (enable) 405 if (enable)
@@ -416,7 +416,7 @@ static int fimc_src_set_fmt_order(struct fimc_context *ctx, u32 fmt)
416 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 416 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
417 u32 cfg; 417 u32 cfg;
418 418
419 DRM_DEBUG_KMS("%s:fmt[0x%x]\n", __func__, fmt); 419 DRM_DEBUG_KMS("fmt[0x%x]\n", fmt);
420 420
421 /* RGB */ 421 /* RGB */
422 cfg = fimc_read(EXYNOS_CISCCTRL); 422 cfg = fimc_read(EXYNOS_CISCCTRL);
@@ -489,7 +489,7 @@ static int fimc_src_set_fmt(struct device *dev, u32 fmt)
489 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 489 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
490 u32 cfg; 490 u32 cfg;
491 491
492 DRM_DEBUG_KMS("%s:fmt[0x%x]\n", __func__, fmt); 492 DRM_DEBUG_KMS("fmt[0x%x]\n", fmt);
493 493
494 cfg = fimc_read(EXYNOS_MSCTRL); 494 cfg = fimc_read(EXYNOS_MSCTRL);
495 cfg &= ~EXYNOS_MSCTRL_INFORMAT_RGB; 495 cfg &= ~EXYNOS_MSCTRL_INFORMAT_RGB;
@@ -549,8 +549,7 @@ static int fimc_src_set_transf(struct device *dev,
549 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 549 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
550 u32 cfg1, cfg2; 550 u32 cfg1, cfg2;
551 551
552 DRM_DEBUG_KMS("%s:degree[%d]flip[0x%x]\n", __func__, 552 DRM_DEBUG_KMS("degree[%d]flip[0x%x]\n", degree, flip);
553 degree, flip);
554 553
555 cfg1 = fimc_read(EXYNOS_MSCTRL); 554 cfg1 = fimc_read(EXYNOS_MSCTRL);
556 cfg1 &= ~(EXYNOS_MSCTRL_FLIP_X_MIRROR | 555 cfg1 &= ~(EXYNOS_MSCTRL_FLIP_X_MIRROR |
@@ -613,10 +612,9 @@ static int fimc_set_window(struct fimc_context *ctx,
613 v1 = pos->y; 612 v1 = pos->y;
614 v2 = sz->vsize - pos->h - pos->y; 613 v2 = sz->vsize - pos->h - pos->y;
615 614
616 DRM_DEBUG_KMS("%s:x[%d]y[%d]w[%d]h[%d]hsize[%d]vsize[%d]\n", 615 DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]hsize[%d]vsize[%d]\n",
617 __func__, pos->x, pos->y, pos->w, pos->h, sz->hsize, sz->vsize); 616 pos->x, pos->y, pos->w, pos->h, sz->hsize, sz->vsize);
618 DRM_DEBUG_KMS("%s:h1[%d]h2[%d]v1[%d]v2[%d]\n", __func__, 617 DRM_DEBUG_KMS("h1[%d]h2[%d]v1[%d]v2[%d]\n", h1, h2, v1, v2);
619 h1, h2, v1, v2);
620 618
621 /* 619 /*
622 * set window offset 1, 2 size 620 * set window offset 1, 2 size
@@ -645,8 +643,8 @@ static int fimc_src_set_size(struct device *dev, int swap,
645 struct drm_exynos_sz img_sz = *sz; 643 struct drm_exynos_sz img_sz = *sz;
646 u32 cfg; 644 u32 cfg;
647 645
648 DRM_DEBUG_KMS("%s:swap[%d]hsize[%d]vsize[%d]\n", 646 DRM_DEBUG_KMS("swap[%d]hsize[%d]vsize[%d]\n",
649 __func__, swap, sz->hsize, sz->vsize); 647 swap, sz->hsize, sz->vsize);
650 648
651 /* original size */ 649 /* original size */
652 cfg = (EXYNOS_ORGISIZE_HORIZONTAL(img_sz.hsize) | 650 cfg = (EXYNOS_ORGISIZE_HORIZONTAL(img_sz.hsize) |
@@ -654,8 +652,7 @@ static int fimc_src_set_size(struct device *dev, int swap,
654 652
655 fimc_write(cfg, EXYNOS_ORGISIZE); 653 fimc_write(cfg, EXYNOS_ORGISIZE);
656 654
657 DRM_DEBUG_KMS("%s:x[%d]y[%d]w[%d]h[%d]\n", __func__, 655 DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]\n", pos->x, pos->y, pos->w, pos->h);
658 pos->x, pos->y, pos->w, pos->h);
659 656
660 if (swap) { 657 if (swap) {
661 img_pos.w = pos->h; 658 img_pos.w = pos->h;
@@ -712,7 +709,7 @@ static int fimc_src_set_addr(struct device *dev,
712 709
713 property = &c_node->property; 710 property = &c_node->property;
714 711
715 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, 712 DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]buf_type[%d]\n",
716 property->prop_id, buf_id, buf_type); 713 property->prop_id, buf_id, buf_type);
717 714
718 if (buf_id > FIMC_MAX_SRC) { 715 if (buf_id > FIMC_MAX_SRC) {
@@ -764,7 +761,7 @@ static int fimc_dst_set_fmt_order(struct fimc_context *ctx, u32 fmt)
764 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 761 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
765 u32 cfg; 762 u32 cfg;
766 763
767 DRM_DEBUG_KMS("%s:fmt[0x%x]\n", __func__, fmt); 764 DRM_DEBUG_KMS("fmt[0x%x]\n", fmt);
768 765
769 /* RGB */ 766 /* RGB */
770 cfg = fimc_read(EXYNOS_CISCCTRL); 767 cfg = fimc_read(EXYNOS_CISCCTRL);
@@ -843,7 +840,7 @@ static int fimc_dst_set_fmt(struct device *dev, u32 fmt)
843 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 840 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
844 u32 cfg; 841 u32 cfg;
845 842
846 DRM_DEBUG_KMS("%s:fmt[0x%x]\n", __func__, fmt); 843 DRM_DEBUG_KMS("fmt[0x%x]\n", fmt);
847 844
848 cfg = fimc_read(EXYNOS_CIEXTEN); 845 cfg = fimc_read(EXYNOS_CIEXTEN);
849 846
@@ -911,8 +908,7 @@ static int fimc_dst_set_transf(struct device *dev,
911 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 908 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
912 u32 cfg; 909 u32 cfg;
913 910
914 DRM_DEBUG_KMS("%s:degree[%d]flip[0x%x]\n", __func__, 911 DRM_DEBUG_KMS("degree[%d]flip[0x%x]\n", degree, flip);
915 degree, flip);
916 912
917 cfg = fimc_read(EXYNOS_CITRGFMT); 913 cfg = fimc_read(EXYNOS_CITRGFMT);
918 cfg &= ~EXYNOS_CITRGFMT_FLIP_MASK; 914 cfg &= ~EXYNOS_CITRGFMT_FLIP_MASK;
@@ -962,7 +958,7 @@ static int fimc_dst_set_transf(struct device *dev,
962 958
963static int fimc_get_ratio_shift(u32 src, u32 dst, u32 *ratio, u32 *shift) 959static int fimc_get_ratio_shift(u32 src, u32 dst, u32 *ratio, u32 *shift)
964{ 960{
965 DRM_DEBUG_KMS("%s:src[%d]dst[%d]\n", __func__, src, dst); 961 DRM_DEBUG_KMS("src[%d]dst[%d]\n", src, dst);
966 962
967 if (src >= dst * 64) { 963 if (src >= dst * 64) {
968 DRM_ERROR("failed to make ratio and shift.\n"); 964 DRM_ERROR("failed to make ratio and shift.\n");
@@ -1031,20 +1027,20 @@ static int fimc_set_prescaler(struct fimc_context *ctx, struct fimc_scaler *sc,
1031 1027
1032 pre_dst_width = src_w / pre_hratio; 1028 pre_dst_width = src_w / pre_hratio;
1033 pre_dst_height = src_h / pre_vratio; 1029 pre_dst_height = src_h / pre_vratio;
1034 DRM_DEBUG_KMS("%s:pre_dst_width[%d]pre_dst_height[%d]\n", __func__, 1030 DRM_DEBUG_KMS("pre_dst_width[%d]pre_dst_height[%d]\n",
1035 pre_dst_width, pre_dst_height); 1031 pre_dst_width, pre_dst_height);
1036 DRM_DEBUG_KMS("%s:pre_hratio[%d]hfactor[%d]pre_vratio[%d]vfactor[%d]\n", 1032 DRM_DEBUG_KMS("pre_hratio[%d]hfactor[%d]pre_vratio[%d]vfactor[%d]\n",
1037 __func__, pre_hratio, hfactor, pre_vratio, vfactor); 1033 pre_hratio, hfactor, pre_vratio, vfactor);
1038 1034
1039 sc->hratio = (src_w << 14) / (dst_w << hfactor); 1035 sc->hratio = (src_w << 14) / (dst_w << hfactor);
1040 sc->vratio = (src_h << 14) / (dst_h << vfactor); 1036 sc->vratio = (src_h << 14) / (dst_h << vfactor);
1041 sc->up_h = (dst_w >= src_w) ? true : false; 1037 sc->up_h = (dst_w >= src_w) ? true : false;
1042 sc->up_v = (dst_h >= src_h) ? true : false; 1038 sc->up_v = (dst_h >= src_h) ? true : false;
1043 DRM_DEBUG_KMS("%s:hratio[%d]vratio[%d]up_h[%d]up_v[%d]\n", 1039 DRM_DEBUG_KMS("hratio[%d]vratio[%d]up_h[%d]up_v[%d]\n",
1044 __func__, sc->hratio, sc->vratio, sc->up_h, sc->up_v); 1040 sc->hratio, sc->vratio, sc->up_h, sc->up_v);
1045 1041
1046 shfactor = FIMC_SHFACTOR - (hfactor + vfactor); 1042 shfactor = FIMC_SHFACTOR - (hfactor + vfactor);
1047 DRM_DEBUG_KMS("%s:shfactor[%d]\n", __func__, shfactor); 1043 DRM_DEBUG_KMS("shfactor[%d]\n", shfactor);
1048 1044
1049 cfg = (EXYNOS_CISCPRERATIO_SHFACTOR(shfactor) | 1045 cfg = (EXYNOS_CISCPRERATIO_SHFACTOR(shfactor) |
1050 EXYNOS_CISCPRERATIO_PREHORRATIO(pre_hratio) | 1046 EXYNOS_CISCPRERATIO_PREHORRATIO(pre_hratio) |
@@ -1062,10 +1058,10 @@ static void fimc_set_scaler(struct fimc_context *ctx, struct fimc_scaler *sc)
1062{ 1058{
1063 u32 cfg, cfg_ext; 1059 u32 cfg, cfg_ext;
1064 1060
1065 DRM_DEBUG_KMS("%s:range[%d]bypass[%d]up_h[%d]up_v[%d]\n", 1061 DRM_DEBUG_KMS("range[%d]bypass[%d]up_h[%d]up_v[%d]\n",
1066 __func__, sc->range, sc->bypass, sc->up_h, sc->up_v); 1062 sc->range, sc->bypass, sc->up_h, sc->up_v);
1067 DRM_DEBUG_KMS("%s:hratio[%d]vratio[%d]\n", 1063 DRM_DEBUG_KMS("hratio[%d]vratio[%d]\n",
1068 __func__, sc->hratio, sc->vratio); 1064 sc->hratio, sc->vratio);
1069 1065
1070 cfg = fimc_read(EXYNOS_CISCCTRL); 1066 cfg = fimc_read(EXYNOS_CISCCTRL);
1071 cfg &= ~(EXYNOS_CISCCTRL_SCALERBYPASS | 1067 cfg &= ~(EXYNOS_CISCCTRL_SCALERBYPASS |
@@ -1105,8 +1101,8 @@ static int fimc_dst_set_size(struct device *dev, int swap,
1105 struct drm_exynos_sz img_sz = *sz; 1101 struct drm_exynos_sz img_sz = *sz;
1106 u32 cfg; 1102 u32 cfg;
1107 1103
1108 DRM_DEBUG_KMS("%s:swap[%d]hsize[%d]vsize[%d]\n", 1104 DRM_DEBUG_KMS("swap[%d]hsize[%d]vsize[%d]\n",
1109 __func__, swap, sz->hsize, sz->vsize); 1105 swap, sz->hsize, sz->vsize);
1110 1106
1111 /* original size */ 1107 /* original size */
1112 cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(img_sz.hsize) | 1108 cfg = (EXYNOS_ORGOSIZE_HORIZONTAL(img_sz.hsize) |
@@ -1114,8 +1110,7 @@ static int fimc_dst_set_size(struct device *dev, int swap,
1114 1110
1115 fimc_write(cfg, EXYNOS_ORGOSIZE); 1111 fimc_write(cfg, EXYNOS_ORGOSIZE);
1116 1112
1117 DRM_DEBUG_KMS("%s:x[%d]y[%d]w[%d]h[%d]\n", 1113 DRM_DEBUG_KMS("x[%d]y[%d]w[%d]h[%d]\n", pos->x, pos->y, pos->w, pos->h);
1118 __func__, pos->x, pos->y, pos->w, pos->h);
1119 1114
1120 /* CSC ITU */ 1115 /* CSC ITU */
1121 cfg = fimc_read(EXYNOS_CIGCTRL); 1116 cfg = fimc_read(EXYNOS_CIGCTRL);
@@ -1172,7 +1167,7 @@ static int fimc_dst_get_buf_seq(struct fimc_context *ctx)
1172 if (cfg & (mask << i)) 1167 if (cfg & (mask << i))
1173 buf_num++; 1168 buf_num++;
1174 1169
1175 DRM_DEBUG_KMS("%s:buf_num[%d]\n", __func__, buf_num); 1170 DRM_DEBUG_KMS("buf_num[%d]\n", buf_num);
1176 1171
1177 return buf_num; 1172 return buf_num;
1178} 1173}
@@ -1186,8 +1181,7 @@ static int fimc_dst_set_buf_seq(struct fimc_context *ctx, u32 buf_id,
1186 u32 mask = 0x00000001 << buf_id; 1181 u32 mask = 0x00000001 << buf_id;
1187 int ret = 0; 1182 int ret = 0;
1188 1183
1189 DRM_DEBUG_KMS("%s:buf_id[%d]buf_type[%d]\n", __func__, 1184 DRM_DEBUG_KMS("buf_id[%d]buf_type[%d]\n", buf_id, buf_type);
1190 buf_id, buf_type);
1191 1185
1192 mutex_lock(&ctx->lock); 1186 mutex_lock(&ctx->lock);
1193 1187
@@ -1244,7 +1238,7 @@ static int fimc_dst_set_addr(struct device *dev,
1244 1238
1245 property = &c_node->property; 1239 property = &c_node->property;
1246 1240
1247 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, 1241 DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]buf_type[%d]\n",
1248 property->prop_id, buf_id, buf_type); 1242 property->prop_id, buf_id, buf_type);
1249 1243
1250 if (buf_id > FIMC_MAX_DST) { 1244 if (buf_id > FIMC_MAX_DST) {
@@ -1294,7 +1288,7 @@ static struct exynos_drm_ipp_ops fimc_dst_ops = {
1294 1288
1295static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable) 1289static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
1296{ 1290{
1297 DRM_DEBUG_KMS("%s:enable[%d]\n", __func__, enable); 1291 DRM_DEBUG_KMS("enable[%d]\n", enable);
1298 1292
1299 if (enable) { 1293 if (enable) {
1300 clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]); 1294 clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
@@ -1318,7 +1312,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
1318 c_node->event_work; 1312 c_node->event_work;
1319 int buf_id; 1313 int buf_id;
1320 1314
1321 DRM_DEBUG_KMS("%s:fimc id[%d]\n", __func__, ctx->id); 1315 DRM_DEBUG_KMS("fimc id[%d]\n", ctx->id);
1322 1316
1323 fimc_clear_irq(ctx); 1317 fimc_clear_irq(ctx);
1324 if (fimc_check_ovf(ctx)) 1318 if (fimc_check_ovf(ctx))
@@ -1331,7 +1325,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
1331 if (buf_id < 0) 1325 if (buf_id < 0)
1332 return IRQ_HANDLED; 1326 return IRQ_HANDLED;
1333 1327
1334 DRM_DEBUG_KMS("%s:buf_id[%d]\n", __func__, buf_id); 1328 DRM_DEBUG_KMS("buf_id[%d]\n", buf_id);
1335 1329
1336 if (fimc_dst_set_buf_seq(ctx, buf_id, IPP_BUF_DEQUEUE) < 0) { 1330 if (fimc_dst_set_buf_seq(ctx, buf_id, IPP_BUF_DEQUEUE) < 0) {
1337 DRM_ERROR("failed to dequeue.\n"); 1331 DRM_ERROR("failed to dequeue.\n");
@@ -1392,7 +1386,7 @@ static inline bool fimc_check_drm_flip(enum drm_exynos_flip flip)
1392 case EXYNOS_DRM_FLIP_BOTH: 1386 case EXYNOS_DRM_FLIP_BOTH:
1393 return true; 1387 return true;
1394 default: 1388 default:
1395 DRM_DEBUG_KMS("%s:invalid flip\n", __func__); 1389 DRM_DEBUG_KMS("invalid flip\n");
1396 return false; 1390 return false;
1397 } 1391 }
1398} 1392}
@@ -1554,7 +1548,7 @@ static int fimc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1554 int ret, i; 1548 int ret, i;
1555 u32 cfg0, cfg1; 1549 u32 cfg0, cfg1;
1556 1550
1557 DRM_DEBUG_KMS("%s:cmd[%d]\n", __func__, cmd); 1551 DRM_DEBUG_KMS("cmd[%d]\n", cmd);
1558 1552
1559 if (!c_node) { 1553 if (!c_node) {
1560 DRM_ERROR("failed to get c_node.\n"); 1554 DRM_ERROR("failed to get c_node.\n");
@@ -1663,7 +1657,7 @@ static void fimc_ippdrv_stop(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1663 struct drm_exynos_ipp_set_wb set_wb = {0, 0}; 1657 struct drm_exynos_ipp_set_wb set_wb = {0, 0};
1664 u32 cfg; 1658 u32 cfg;
1665 1659
1666 DRM_DEBUG_KMS("%s:cmd[%d]\n", __func__, cmd); 1660 DRM_DEBUG_KMS("cmd[%d]\n", cmd);
1667 1661
1668 switch (cmd) { 1662 switch (cmd) {
1669 case IPP_CMD_M2M: 1663 case IPP_CMD_M2M:
@@ -1853,8 +1847,7 @@ static int fimc_probe(struct platform_device *pdev)
1853 goto err_put_clk; 1847 goto err_put_clk;
1854 } 1848 }
1855 1849
1856 DRM_DEBUG_KMS("%s:id[%d]ippdrv[0x%x]\n", __func__, ctx->id, 1850 DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv);
1857 (int)ippdrv);
1858 1851
1859 mutex_init(&ctx->lock); 1852 mutex_init(&ctx->lock);
1860 platform_set_drvdata(pdev, ctx); 1853 platform_set_drvdata(pdev, ctx);
@@ -1901,7 +1894,7 @@ static int fimc_suspend(struct device *dev)
1901{ 1894{
1902 struct fimc_context *ctx = get_fimc_context(dev); 1895 struct fimc_context *ctx = get_fimc_context(dev);
1903 1896
1904 DRM_DEBUG_KMS("%s:id[%d]\n", __func__, ctx->id); 1897 DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1905 1898
1906 if (pm_runtime_suspended(dev)) 1899 if (pm_runtime_suspended(dev))
1907 return 0; 1900 return 0;
@@ -1913,7 +1906,7 @@ static int fimc_resume(struct device *dev)
1913{ 1906{
1914 struct fimc_context *ctx = get_fimc_context(dev); 1907 struct fimc_context *ctx = get_fimc_context(dev);
1915 1908
1916 DRM_DEBUG_KMS("%s:id[%d]\n", __func__, ctx->id); 1909 DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1917 1910
1918 if (!pm_runtime_suspended(dev)) 1911 if (!pm_runtime_suspended(dev))
1919 return fimc_clk_ctrl(ctx, true); 1912 return fimc_clk_ctrl(ctx, true);
@@ -1927,7 +1920,7 @@ static int fimc_runtime_suspend(struct device *dev)
1927{ 1920{
1928 struct fimc_context *ctx = get_fimc_context(dev); 1921 struct fimc_context *ctx = get_fimc_context(dev);
1929 1922
1930 DRM_DEBUG_KMS("%s:id[%d]\n", __func__, ctx->id); 1923 DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1931 1924
1932 return fimc_clk_ctrl(ctx, false); 1925 return fimc_clk_ctrl(ctx, false);
1933} 1926}
@@ -1936,7 +1929,7 @@ static int fimc_runtime_resume(struct device *dev)
1936{ 1929{
1937 struct fimc_context *ctx = get_fimc_context(dev); 1930 struct fimc_context *ctx = get_fimc_context(dev);
1938 1931
1939 DRM_DEBUG_KMS("%s:id[%d]\n", __func__, ctx->id); 1932 DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1940 1933
1941 return fimc_clk_ctrl(ctx, true); 1934 return fimc_clk_ctrl(ctx, true);
1942} 1935}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 398a0b31ddd0..472e3b25e7f2 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -456,7 +456,7 @@ static void gsc_handle_irq(struct gsc_context *ctx, bool enable,
456{ 456{
457 u32 cfg; 457 u32 cfg;
458 458
459 DRM_DEBUG_KMS("%s:enable[%d]overflow[%d]level[%d]\n", __func__, 459 DRM_DEBUG_KMS("enable[%d]overflow[%d]level[%d]\n",
460 enable, overflow, done); 460 enable, overflow, done);
461 461
462 cfg = gsc_read(GSC_IRQ); 462 cfg = gsc_read(GSC_IRQ);
@@ -487,7 +487,7 @@ static int gsc_src_set_fmt(struct device *dev, u32 fmt)
487 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 487 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
488 u32 cfg; 488 u32 cfg;
489 489
490 DRM_DEBUG_KMS("%s:fmt[0x%x]\n", __func__, fmt); 490 DRM_DEBUG_KMS("fmt[0x%x]\n", fmt);
491 491
492 cfg = gsc_read(GSC_IN_CON); 492 cfg = gsc_read(GSC_IN_CON);
493 cfg &= ~(GSC_IN_RGB_TYPE_MASK | GSC_IN_YUV422_1P_ORDER_MASK | 493 cfg &= ~(GSC_IN_RGB_TYPE_MASK | GSC_IN_YUV422_1P_ORDER_MASK |
@@ -563,8 +563,7 @@ static int gsc_src_set_transf(struct device *dev,
563 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 563 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
564 u32 cfg; 564 u32 cfg;
565 565
566 DRM_DEBUG_KMS("%s:degree[%d]flip[0x%x]\n", __func__, 566 DRM_DEBUG_KMS("degree[%d]flip[0x%x]\n", degree, flip);
567 degree, flip);
568 567
569 cfg = gsc_read(GSC_IN_CON); 568 cfg = gsc_read(GSC_IN_CON);
570 cfg &= ~GSC_IN_ROT_MASK; 569 cfg &= ~GSC_IN_ROT_MASK;
@@ -612,8 +611,8 @@ static int gsc_src_set_size(struct device *dev, int swap,
612 struct gsc_scaler *sc = &ctx->sc; 611 struct gsc_scaler *sc = &ctx->sc;
613 u32 cfg; 612 u32 cfg;
614 613
615 DRM_DEBUG_KMS("%s:swap[%d]x[%d]y[%d]w[%d]h[%d]\n", 614 DRM_DEBUG_KMS("swap[%d]x[%d]y[%d]w[%d]h[%d]\n",
616 __func__, swap, pos->x, pos->y, pos->w, pos->h); 615 swap, pos->x, pos->y, pos->w, pos->h);
617 616
618 if (swap) { 617 if (swap) {
619 img_pos.w = pos->h; 618 img_pos.w = pos->h;
@@ -630,8 +629,7 @@ static int gsc_src_set_size(struct device *dev, int swap,
630 GSC_CROPPED_HEIGHT(img_pos.h)); 629 GSC_CROPPED_HEIGHT(img_pos.h));
631 gsc_write(cfg, GSC_CROPPED_SIZE); 630 gsc_write(cfg, GSC_CROPPED_SIZE);
632 631
633 DRM_DEBUG_KMS("%s:hsize[%d]vsize[%d]\n", 632 DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", sz->hsize, sz->vsize);
634 __func__, sz->hsize, sz->vsize);
635 633
636 /* original size */ 634 /* original size */
637 cfg = gsc_read(GSC_SRCIMG_SIZE); 635 cfg = gsc_read(GSC_SRCIMG_SIZE);
@@ -646,8 +644,7 @@ static int gsc_src_set_size(struct device *dev, int swap,
646 cfg = gsc_read(GSC_IN_CON); 644 cfg = gsc_read(GSC_IN_CON);
647 cfg &= ~GSC_IN_RGB_TYPE_MASK; 645 cfg &= ~GSC_IN_RGB_TYPE_MASK;
648 646
649 DRM_DEBUG_KMS("%s:width[%d]range[%d]\n", 647 DRM_DEBUG_KMS("width[%d]range[%d]\n", pos->w, sc->range);
650 __func__, pos->w, sc->range);
651 648
652 if (pos->w >= GSC_WIDTH_ITU_709) 649 if (pos->w >= GSC_WIDTH_ITU_709)
653 if (sc->range) 650 if (sc->range)
@@ -673,8 +670,7 @@ static int gsc_src_set_buf_seq(struct gsc_context *ctx, u32 buf_id,
673 u32 cfg; 670 u32 cfg;
674 u32 mask = 0x00000001 << buf_id; 671 u32 mask = 0x00000001 << buf_id;
675 672
676 DRM_DEBUG_KMS("%s:buf_id[%d]buf_type[%d]\n", __func__, 673 DRM_DEBUG_KMS("buf_id[%d]buf_type[%d]\n", buf_id, buf_type);
677 buf_id, buf_type);
678 674
679 /* mask register set */ 675 /* mask register set */
680 cfg = gsc_read(GSC_IN_BASE_ADDR_Y_MASK); 676 cfg = gsc_read(GSC_IN_BASE_ADDR_Y_MASK);
@@ -717,7 +713,7 @@ static int gsc_src_set_addr(struct device *dev,
717 713
718 property = &c_node->property; 714 property = &c_node->property;
719 715
720 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, 716 DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]buf_type[%d]\n",
721 property->prop_id, buf_id, buf_type); 717 property->prop_id, buf_id, buf_type);
722 718
723 if (buf_id > GSC_MAX_SRC) { 719 if (buf_id > GSC_MAX_SRC) {
@@ -761,7 +757,7 @@ static int gsc_dst_set_fmt(struct device *dev, u32 fmt)
761 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 757 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
762 u32 cfg; 758 u32 cfg;
763 759
764 DRM_DEBUG_KMS("%s:fmt[0x%x]\n", __func__, fmt); 760 DRM_DEBUG_KMS("fmt[0x%x]\n", fmt);
765 761
766 cfg = gsc_read(GSC_OUT_CON); 762 cfg = gsc_read(GSC_OUT_CON);
767 cfg &= ~(GSC_OUT_RGB_TYPE_MASK | GSC_OUT_YUV422_1P_ORDER_MASK | 763 cfg &= ~(GSC_OUT_RGB_TYPE_MASK | GSC_OUT_YUV422_1P_ORDER_MASK |
@@ -834,8 +830,7 @@ static int gsc_dst_set_transf(struct device *dev,
834 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv; 830 struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
835 u32 cfg; 831 u32 cfg;
836 832
837 DRM_DEBUG_KMS("%s:degree[%d]flip[0x%x]\n", __func__, 833 DRM_DEBUG_KMS("degree[%d]flip[0x%x]\n", degree, flip);
838 degree, flip);
839 834
840 cfg = gsc_read(GSC_IN_CON); 835 cfg = gsc_read(GSC_IN_CON);
841 cfg &= ~GSC_IN_ROT_MASK; 836 cfg &= ~GSC_IN_ROT_MASK;
@@ -877,7 +872,7 @@ static int gsc_dst_set_transf(struct device *dev,
877 872
878static int gsc_get_ratio_shift(u32 src, u32 dst, u32 *ratio) 873static int gsc_get_ratio_shift(u32 src, u32 dst, u32 *ratio)
879{ 874{
880 DRM_DEBUG_KMS("%s:src[%d]dst[%d]\n", __func__, src, dst); 875 DRM_DEBUG_KMS("src[%d]dst[%d]\n", src, dst);
881 876
882 if (src >= dst * 8) { 877 if (src >= dst * 8) {
883 DRM_ERROR("failed to make ratio and shift.\n"); 878 DRM_ERROR("failed to make ratio and shift.\n");
@@ -940,20 +935,19 @@ static int gsc_set_prescaler(struct gsc_context *ctx, struct gsc_scaler *sc,
940 return ret; 935 return ret;
941 } 936 }
942 937
943 DRM_DEBUG_KMS("%s:pre_hratio[%d]pre_vratio[%d]\n", 938 DRM_DEBUG_KMS("pre_hratio[%d]pre_vratio[%d]\n",
944 __func__, sc->pre_hratio, sc->pre_vratio); 939 sc->pre_hratio, sc->pre_vratio);
945 940
946 sc->main_hratio = (src_w << 16) / dst_w; 941 sc->main_hratio = (src_w << 16) / dst_w;
947 sc->main_vratio = (src_h << 16) / dst_h; 942 sc->main_vratio = (src_h << 16) / dst_h;
948 943
949 DRM_DEBUG_KMS("%s:main_hratio[%ld]main_vratio[%ld]\n", 944 DRM_DEBUG_KMS("main_hratio[%ld]main_vratio[%ld]\n",
950 __func__, sc->main_hratio, sc->main_vratio); 945 sc->main_hratio, sc->main_vratio);
951 946
952 gsc_get_prescaler_shfactor(sc->pre_hratio, sc->pre_vratio, 947 gsc_get_prescaler_shfactor(sc->pre_hratio, sc->pre_vratio,
953 &sc->pre_shfactor); 948 &sc->pre_shfactor);
954 949
955 DRM_DEBUG_KMS("%s:pre_shfactor[%d]\n", __func__, 950 DRM_DEBUG_KMS("pre_shfactor[%d]\n", sc->pre_shfactor);
956 sc->pre_shfactor);
957 951
958 cfg = (GSC_PRESC_SHFACTOR(sc->pre_shfactor) | 952 cfg = (GSC_PRESC_SHFACTOR(sc->pre_shfactor) |
959 GSC_PRESC_H_RATIO(sc->pre_hratio) | 953 GSC_PRESC_H_RATIO(sc->pre_hratio) |
@@ -1019,8 +1013,8 @@ static void gsc_set_scaler(struct gsc_context *ctx, struct gsc_scaler *sc)
1019{ 1013{
1020 u32 cfg; 1014 u32 cfg;
1021 1015
1022 DRM_DEBUG_KMS("%s:main_hratio[%ld]main_vratio[%ld]\n", 1016 DRM_DEBUG_KMS("main_hratio[%ld]main_vratio[%ld]\n",
1023 __func__, sc->main_hratio, sc->main_vratio); 1017 sc->main_hratio, sc->main_vratio);
1024 1018
1025 gsc_set_h_coef(ctx, sc->main_hratio); 1019 gsc_set_h_coef(ctx, sc->main_hratio);
1026 cfg = GSC_MAIN_H_RATIO_VALUE(sc->main_hratio); 1020 cfg = GSC_MAIN_H_RATIO_VALUE(sc->main_hratio);
@@ -1039,8 +1033,8 @@ static int gsc_dst_set_size(struct device *dev, int swap,
1039 struct gsc_scaler *sc = &ctx->sc; 1033 struct gsc_scaler *sc = &ctx->sc;
1040 u32 cfg; 1034 u32 cfg;
1041 1035
1042 DRM_DEBUG_KMS("%s:swap[%d]x[%d]y[%d]w[%d]h[%d]\n", 1036 DRM_DEBUG_KMS("swap[%d]x[%d]y[%d]w[%d]h[%d]\n",
1043 __func__, swap, pos->x, pos->y, pos->w, pos->h); 1037 swap, pos->x, pos->y, pos->w, pos->h);
1044 1038
1045 if (swap) { 1039 if (swap) {
1046 img_pos.w = pos->h; 1040 img_pos.w = pos->h;
@@ -1056,8 +1050,7 @@ static int gsc_dst_set_size(struct device *dev, int swap,
1056 cfg = (GSC_SCALED_WIDTH(img_pos.w) | GSC_SCALED_HEIGHT(img_pos.h)); 1050 cfg = (GSC_SCALED_WIDTH(img_pos.w) | GSC_SCALED_HEIGHT(img_pos.h));
1057 gsc_write(cfg, GSC_SCALED_SIZE); 1051 gsc_write(cfg, GSC_SCALED_SIZE);
1058 1052
1059 DRM_DEBUG_KMS("%s:hsize[%d]vsize[%d]\n", 1053 DRM_DEBUG_KMS("hsize[%d]vsize[%d]\n", sz->hsize, sz->vsize);
1060 __func__, sz->hsize, sz->vsize);
1061 1054
1062 /* original size */ 1055 /* original size */
1063 cfg = gsc_read(GSC_DSTIMG_SIZE); 1056 cfg = gsc_read(GSC_DSTIMG_SIZE);
@@ -1070,8 +1063,7 @@ static int gsc_dst_set_size(struct device *dev, int swap,
1070 cfg = gsc_read(GSC_OUT_CON); 1063 cfg = gsc_read(GSC_OUT_CON);
1071 cfg &= ~GSC_OUT_RGB_TYPE_MASK; 1064 cfg &= ~GSC_OUT_RGB_TYPE_MASK;
1072 1065
1073 DRM_DEBUG_KMS("%s:width[%d]range[%d]\n", 1066 DRM_DEBUG_KMS("width[%d]range[%d]\n", pos->w, sc->range);
1074 __func__, pos->w, sc->range);
1075 1067
1076 if (pos->w >= GSC_WIDTH_ITU_709) 1068 if (pos->w >= GSC_WIDTH_ITU_709)
1077 if (sc->range) 1069 if (sc->range)
@@ -1100,7 +1092,7 @@ static int gsc_dst_get_buf_seq(struct gsc_context *ctx)
1100 if (cfg & (mask << i)) 1092 if (cfg & (mask << i))
1101 buf_num--; 1093 buf_num--;
1102 1094
1103 DRM_DEBUG_KMS("%s:buf_num[%d]\n", __func__, buf_num); 1095 DRM_DEBUG_KMS("buf_num[%d]\n", buf_num);
1104 1096
1105 return buf_num; 1097 return buf_num;
1106} 1098}
@@ -1114,8 +1106,7 @@ static int gsc_dst_set_buf_seq(struct gsc_context *ctx, u32 buf_id,
1114 u32 mask = 0x00000001 << buf_id; 1106 u32 mask = 0x00000001 << buf_id;
1115 int ret = 0; 1107 int ret = 0;
1116 1108
1117 DRM_DEBUG_KMS("%s:buf_id[%d]buf_type[%d]\n", __func__, 1109 DRM_DEBUG_KMS("buf_id[%d]buf_type[%d]\n", buf_id, buf_type);
1118 buf_id, buf_type);
1119 1110
1120 mutex_lock(&ctx->lock); 1111 mutex_lock(&ctx->lock);
1121 1112
@@ -1173,7 +1164,7 @@ static int gsc_dst_set_addr(struct device *dev,
1173 1164
1174 property = &c_node->property; 1165 property = &c_node->property;
1175 1166
1176 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__, 1167 DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]buf_type[%d]\n",
1177 property->prop_id, buf_id, buf_type); 1168 property->prop_id, buf_id, buf_type);
1178 1169
1179 if (buf_id > GSC_MAX_DST) { 1170 if (buf_id > GSC_MAX_DST) {
@@ -1213,7 +1204,7 @@ static struct exynos_drm_ipp_ops gsc_dst_ops = {
1213 1204
1214static int gsc_clk_ctrl(struct gsc_context *ctx, bool enable) 1205static int gsc_clk_ctrl(struct gsc_context *ctx, bool enable)
1215{ 1206{
1216 DRM_DEBUG_KMS("%s:enable[%d]\n", __func__, enable); 1207 DRM_DEBUG_KMS("enable[%d]\n", enable);
1217 1208
1218 if (enable) { 1209 if (enable) {
1219 clk_enable(ctx->gsc_clk); 1210 clk_enable(ctx->gsc_clk);
@@ -1232,7 +1223,7 @@ static int gsc_get_src_buf_index(struct gsc_context *ctx)
1232 u32 buf_id = GSC_MAX_SRC; 1223 u32 buf_id = GSC_MAX_SRC;
1233 int ret; 1224 int ret;
1234 1225
1235 DRM_DEBUG_KMS("%s:gsc id[%d]\n", __func__, ctx->id); 1226 DRM_DEBUG_KMS("gsc id[%d]\n", ctx->id);
1236 1227
1237 cfg = gsc_read(GSC_IN_BASE_ADDR_Y_MASK); 1228 cfg = gsc_read(GSC_IN_BASE_ADDR_Y_MASK);
1238 curr_index = GSC_IN_CURR_GET_INDEX(cfg); 1229 curr_index = GSC_IN_CURR_GET_INDEX(cfg);
@@ -1255,7 +1246,7 @@ static int gsc_get_src_buf_index(struct gsc_context *ctx)
1255 return ret; 1246 return ret;
1256 } 1247 }
1257 1248
1258 DRM_DEBUG_KMS("%s:cfg[0x%x]curr_index[%d]buf_id[%d]\n", __func__, cfg, 1249 DRM_DEBUG_KMS("cfg[0x%x]curr_index[%d]buf_id[%d]\n", cfg,
1259 curr_index, buf_id); 1250 curr_index, buf_id);
1260 1251
1261 return buf_id; 1252 return buf_id;
@@ -1267,7 +1258,7 @@ static int gsc_get_dst_buf_index(struct gsc_context *ctx)
1267 u32 buf_id = GSC_MAX_DST; 1258 u32 buf_id = GSC_MAX_DST;
1268 int ret; 1259 int ret;
1269 1260
1270 DRM_DEBUG_KMS("%s:gsc id[%d]\n", __func__, ctx->id); 1261 DRM_DEBUG_KMS("gsc id[%d]\n", ctx->id);
1271 1262
1272 cfg = gsc_read(GSC_OUT_BASE_ADDR_Y_MASK); 1263 cfg = gsc_read(GSC_OUT_BASE_ADDR_Y_MASK);
1273 curr_index = GSC_OUT_CURR_GET_INDEX(cfg); 1264 curr_index = GSC_OUT_CURR_GET_INDEX(cfg);
@@ -1290,7 +1281,7 @@ static int gsc_get_dst_buf_index(struct gsc_context *ctx)
1290 return ret; 1281 return ret;
1291 } 1282 }
1292 1283
1293 DRM_DEBUG_KMS("%s:cfg[0x%x]curr_index[%d]buf_id[%d]\n", __func__, cfg, 1284 DRM_DEBUG_KMS("cfg[0x%x]curr_index[%d]buf_id[%d]\n", cfg,
1294 curr_index, buf_id); 1285 curr_index, buf_id);
1295 1286
1296 return buf_id; 1287 return buf_id;
@@ -1306,7 +1297,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
1306 u32 status; 1297 u32 status;
1307 int buf_id[EXYNOS_DRM_OPS_MAX]; 1298 int buf_id[EXYNOS_DRM_OPS_MAX];
1308 1299
1309 DRM_DEBUG_KMS("%s:gsc id[%d]\n", __func__, ctx->id); 1300 DRM_DEBUG_KMS("gsc id[%d]\n", ctx->id);
1310 1301
1311 status = gsc_read(GSC_IRQ); 1302 status = gsc_read(GSC_IRQ);
1312 if (status & GSC_IRQ_STATUS_OR_IRQ) { 1303 if (status & GSC_IRQ_STATUS_OR_IRQ) {
@@ -1327,7 +1318,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
1327 if (buf_id[EXYNOS_DRM_OPS_DST] < 0) 1318 if (buf_id[EXYNOS_DRM_OPS_DST] < 0)
1328 return IRQ_HANDLED; 1319 return IRQ_HANDLED;
1329 1320
1330 DRM_DEBUG_KMS("%s:buf_id_src[%d]buf_id_dst[%d]\n", __func__, 1321 DRM_DEBUG_KMS("buf_id_src[%d]buf_id_dst[%d]\n",
1331 buf_id[EXYNOS_DRM_OPS_SRC], buf_id[EXYNOS_DRM_OPS_DST]); 1322 buf_id[EXYNOS_DRM_OPS_SRC], buf_id[EXYNOS_DRM_OPS_DST]);
1332 1323
1333 event_work->ippdrv = ippdrv; 1324 event_work->ippdrv = ippdrv;
@@ -1388,7 +1379,7 @@ static inline bool gsc_check_drm_flip(enum drm_exynos_flip flip)
1388 case EXYNOS_DRM_FLIP_BOTH: 1379 case EXYNOS_DRM_FLIP_BOTH:
1389 return true; 1380 return true;
1390 default: 1381 default:
1391 DRM_DEBUG_KMS("%s:invalid flip\n", __func__); 1382 DRM_DEBUG_KMS("invalid flip\n");
1392 return false; 1383 return false;
1393 } 1384 }
1394} 1385}
@@ -1539,7 +1530,7 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1539 u32 cfg; 1530 u32 cfg;
1540 int ret, i; 1531 int ret, i;
1541 1532
1542 DRM_DEBUG_KMS("%s:cmd[%d]\n", __func__, cmd); 1533 DRM_DEBUG_KMS("cmd[%d]\n", cmd);
1543 1534
1544 if (!c_node) { 1535 if (!c_node) {
1545 DRM_ERROR("failed to get c_node.\n"); 1536 DRM_ERROR("failed to get c_node.\n");
@@ -1633,7 +1624,7 @@ static void gsc_ippdrv_stop(struct device *dev, enum drm_exynos_ipp_cmd cmd)
1633 struct drm_exynos_ipp_set_wb set_wb = {0, 0}; 1624 struct drm_exynos_ipp_set_wb set_wb = {0, 0};
1634 u32 cfg; 1625 u32 cfg;
1635 1626
1636 DRM_DEBUG_KMS("%s:cmd[%d]\n", __func__, cmd); 1627 DRM_DEBUG_KMS("cmd[%d]\n", cmd);
1637 1628
1638 switch (cmd) { 1629 switch (cmd) {
1639 case IPP_CMD_M2M: 1630 case IPP_CMD_M2M:
@@ -1718,8 +1709,7 @@ static int gsc_probe(struct platform_device *pdev)
1718 return ret; 1709 return ret;
1719 } 1710 }
1720 1711
1721 DRM_DEBUG_KMS("%s:id[%d]ippdrv[0x%x]\n", __func__, ctx->id, 1712 DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv);
1722 (int)ippdrv);
1723 1713
1724 mutex_init(&ctx->lock); 1714 mutex_init(&ctx->lock);
1725 platform_set_drvdata(pdev, ctx); 1715 platform_set_drvdata(pdev, ctx);
@@ -1762,7 +1752,7 @@ static int gsc_suspend(struct device *dev)
1762{ 1752{
1763 struct gsc_context *ctx = get_gsc_context(dev); 1753 struct gsc_context *ctx = get_gsc_context(dev);
1764 1754
1765 DRM_DEBUG_KMS("%s:id[%d]\n", __func__, ctx->id); 1755 DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1766 1756
1767 if (pm_runtime_suspended(dev)) 1757 if (pm_runtime_suspended(dev))
1768 return 0; 1758 return 0;
@@ -1774,7 +1764,7 @@ static int gsc_resume(struct device *dev)
1774{ 1764{
1775 struct gsc_context *ctx = get_gsc_context(dev); 1765 struct gsc_context *ctx = get_gsc_context(dev);
1776 1766
1777 DRM_DEBUG_KMS("%s:id[%d]\n", __func__, ctx->id); 1767 DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1778 1768
1779 if (!pm_runtime_suspended(dev)) 1769 if (!pm_runtime_suspended(dev))
1780 return gsc_clk_ctrl(ctx, true); 1770 return gsc_clk_ctrl(ctx, true);
@@ -1788,7 +1778,7 @@ static int gsc_runtime_suspend(struct device *dev)
1788{ 1778{
1789 struct gsc_context *ctx = get_gsc_context(dev); 1779 struct gsc_context *ctx = get_gsc_context(dev);
1790 1780
1791 DRM_DEBUG_KMS("%s:id[%d]\n", __func__, ctx->id); 1781 DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1792 1782
1793 return gsc_clk_ctrl(ctx, false); 1783 return gsc_clk_ctrl(ctx, false);
1794} 1784}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 32d174ff1c50..01cb9a03aac0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -173,7 +173,7 @@ static void *ipp_find_obj(struct idr *id_idr, struct mutex *lock, u32 id)
173{ 173{
174 void *obj; 174 void *obj;
175 175
176 DRM_DEBUG_KMS("%s:id[%d]\n", __func__, id); 176 DRM_DEBUG_KMS("id[%d]\n", id);
177 177
178 mutex_lock(lock); 178 mutex_lock(lock);
179 179
@@ -210,7 +210,7 @@ static struct exynos_drm_ippdrv *ipp_find_driver(struct ipp_context *ctx,
210 struct exynos_drm_ippdrv *ippdrv; 210 struct exynos_drm_ippdrv *ippdrv;
211 u32 ipp_id = property->ipp_id; 211 u32 ipp_id = property->ipp_id;
212 212
213 DRM_DEBUG_KMS("%s:ipp_id[%d]\n", __func__, ipp_id); 213 DRM_DEBUG_KMS("ipp_id[%d]\n", ipp_id);
214 214
215 if (ipp_id) { 215 if (ipp_id) {
216 /* find ipp driver using idr */ 216 /* find ipp driver using idr */
@@ -251,14 +251,13 @@ static struct exynos_drm_ippdrv *ipp_find_driver(struct ipp_context *ctx,
251 */ 251 */
252 list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) { 252 list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) {
253 if (ipp_check_dedicated(ippdrv, property->cmd)) { 253 if (ipp_check_dedicated(ippdrv, property->cmd)) {
254 DRM_DEBUG_KMS("%s:used device.\n", __func__); 254 DRM_DEBUG_KMS("used device.\n");
255 continue; 255 continue;
256 } 256 }
257 257
258 if (ippdrv->check_property && 258 if (ippdrv->check_property &&
259 ippdrv->check_property(ippdrv->dev, property)) { 259 ippdrv->check_property(ippdrv->dev, property)) {
260 DRM_DEBUG_KMS("%s:not support property.\n", 260 DRM_DEBUG_KMS("not support property.\n");
261 __func__);
262 continue; 261 continue;
263 } 262 }
264 263
@@ -277,10 +276,10 @@ static struct exynos_drm_ippdrv *ipp_find_drv_by_handle(u32 prop_id)
277 struct drm_exynos_ipp_cmd_node *c_node; 276 struct drm_exynos_ipp_cmd_node *c_node;
278 int count = 0; 277 int count = 0;
279 278
280 DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, prop_id); 279 DRM_DEBUG_KMS("prop_id[%d]\n", prop_id);
281 280
282 if (list_empty(&exynos_drm_ippdrv_list)) { 281 if (list_empty(&exynos_drm_ippdrv_list)) {
283 DRM_DEBUG_KMS("%s:ippdrv_list is empty.\n", __func__); 282 DRM_DEBUG_KMS("ippdrv_list is empty.\n");
284 return ERR_PTR(-ENODEV); 283 return ERR_PTR(-ENODEV);
285 } 284 }
286 285
@@ -290,8 +289,7 @@ static struct exynos_drm_ippdrv *ipp_find_drv_by_handle(u32 prop_id)
290 * e.g PAUSE state, queue buf, command contro. 289 * e.g PAUSE state, queue buf, command contro.
291 */ 290 */
292 list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) { 291 list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) {
293 DRM_DEBUG_KMS("%s:count[%d]ippdrv[0x%x]\n", __func__, 292 DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]\n", count++, (int)ippdrv);
294 count++, (int)ippdrv);
295 293
296 if (!list_empty(&ippdrv->cmd_list)) { 294 if (!list_empty(&ippdrv->cmd_list)) {
297 list_for_each_entry(c_node, &ippdrv->cmd_list, list) 295 list_for_each_entry(c_node, &ippdrv->cmd_list, list)
@@ -324,7 +322,7 @@ int exynos_drm_ipp_get_property(struct drm_device *drm_dev, void *data,
324 return -EINVAL; 322 return -EINVAL;
325 } 323 }
326 324
327 DRM_DEBUG_KMS("%s:ipp_id[%d]\n", __func__, prop_list->ipp_id); 325 DRM_DEBUG_KMS("ipp_id[%d]\n", prop_list->ipp_id);
328 326
329 if (!prop_list->ipp_id) { 327 if (!prop_list->ipp_id) {
330 list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) 328 list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list)
@@ -363,11 +361,11 @@ static void ipp_print_property(struct drm_exynos_ipp_property *property,
363 struct drm_exynos_pos *pos = &config->pos; 361 struct drm_exynos_pos *pos = &config->pos;
364 struct drm_exynos_sz *sz = &config->sz; 362 struct drm_exynos_sz *sz = &config->sz;
365 363
366 DRM_DEBUG_KMS("%s:prop_id[%d]ops[%s]fmt[0x%x]\n", 364 DRM_DEBUG_KMS("prop_id[%d]ops[%s]fmt[0x%x]\n",
367 __func__, property->prop_id, idx ? "dst" : "src", config->fmt); 365 property->prop_id, idx ? "dst" : "src", config->fmt);
368 366
369 DRM_DEBUG_KMS("%s:pos[%d %d %d %d]sz[%d %d]f[%d]r[%d]\n", 367 DRM_DEBUG_KMS("pos[%d %d %d %d]sz[%d %d]f[%d]r[%d]\n",
370 __func__, pos->x, pos->y, pos->w, pos->h, 368 pos->x, pos->y, pos->w, pos->h,
371 sz->hsize, sz->vsize, config->flip, config->degree); 369 sz->hsize, sz->vsize, config->flip, config->degree);
372} 370}
373 371
@@ -377,7 +375,7 @@ static int ipp_find_and_set_property(struct drm_exynos_ipp_property *property)
377 struct drm_exynos_ipp_cmd_node *c_node; 375 struct drm_exynos_ipp_cmd_node *c_node;
378 u32 prop_id = property->prop_id; 376 u32 prop_id = property->prop_id;
379 377
380 DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, prop_id); 378 DRM_DEBUG_KMS("prop_id[%d]\n", prop_id);
381 379
382 ippdrv = ipp_find_drv_by_handle(prop_id); 380 ippdrv = ipp_find_drv_by_handle(prop_id);
383 if (IS_ERR(ippdrv)) { 381 if (IS_ERR(ippdrv)) {
@@ -393,8 +391,8 @@ static int ipp_find_and_set_property(struct drm_exynos_ipp_property *property)
393 list_for_each_entry(c_node, &ippdrv->cmd_list, list) { 391 list_for_each_entry(c_node, &ippdrv->cmd_list, list) {
394 if ((c_node->property.prop_id == prop_id) && 392 if ((c_node->property.prop_id == prop_id) &&
395 (c_node->state == IPP_STATE_STOP)) { 393 (c_node->state == IPP_STATE_STOP)) {
396 DRM_DEBUG_KMS("%s:found cmd[%d]ippdrv[0x%x]\n", 394 DRM_DEBUG_KMS("found cmd[%d]ippdrv[0x%x]\n",
397 __func__, property->cmd, (int)ippdrv); 395 property->cmd, (int)ippdrv);
398 396
399 c_node->property = *property; 397 c_node->property = *property;
400 return 0; 398 return 0;
@@ -472,7 +470,7 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data,
472 * instead of allocation. 470 * instead of allocation.
473 */ 471 */
474 if (property->prop_id) { 472 if (property->prop_id) {
475 DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id); 473 DRM_DEBUG_KMS("prop_id[%d]\n", property->prop_id);
476 return ipp_find_and_set_property(property); 474 return ipp_find_and_set_property(property);
477 } 475 }
478 476
@@ -498,8 +496,8 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data,
498 goto err_clear; 496 goto err_clear;
499 } 497 }
500 498
501 DRM_DEBUG_KMS("%s:created prop_id[%d]cmd[%d]ippdrv[0x%x]\n", 499 DRM_DEBUG_KMS("created prop_id[%d]cmd[%d]ippdrv[0x%x]\n",
502 __func__, property->prop_id, property->cmd, (int)ippdrv); 500 property->prop_id, property->cmd, (int)ippdrv);
503 501
504 /* stored property information and ippdrv in private data */ 502 /* stored property information and ippdrv in private data */
505 c_node->priv = priv; 503 c_node->priv = priv;
@@ -584,20 +582,19 @@ static int ipp_check_mem_list(struct drm_exynos_ipp_cmd_node *c_node)
584 head = &c_node->mem_list[i]; 582 head = &c_node->mem_list[i];
585 583
586 if (list_empty(head)) { 584 if (list_empty(head)) {
587 DRM_DEBUG_KMS("%s:%s memory empty.\n", __func__, 585 DRM_DEBUG_KMS("%s memory empty.\n", i ? "dst" : "src");
588 i ? "dst" : "src");
589 continue; 586 continue;
590 } 587 }
591 588
592 /* find memory node entry */ 589 /* find memory node entry */
593 list_for_each_entry(m_node, head, list) { 590 list_for_each_entry(m_node, head, list) {
594 DRM_DEBUG_KMS("%s:%s,count[%d]m_node[0x%x]\n", __func__, 591 DRM_DEBUG_KMS("%s,count[%d]m_node[0x%x]\n",
595 i ? "dst" : "src", count[i], (int)m_node); 592 i ? "dst" : "src", count[i], (int)m_node);
596 count[i]++; 593 count[i]++;
597 } 594 }
598 } 595 }
599 596
600 DRM_DEBUG_KMS("%s:min[%d]max[%d]\n", __func__, 597 DRM_DEBUG_KMS("min[%d]max[%d]\n",
601 min(count[EXYNOS_DRM_OPS_SRC], count[EXYNOS_DRM_OPS_DST]), 598 min(count[EXYNOS_DRM_OPS_SRC], count[EXYNOS_DRM_OPS_DST]),
602 max(count[EXYNOS_DRM_OPS_SRC], count[EXYNOS_DRM_OPS_DST])); 599 max(count[EXYNOS_DRM_OPS_SRC], count[EXYNOS_DRM_OPS_DST]));
603 600
@@ -626,15 +623,14 @@ static struct drm_exynos_ipp_mem_node
626 struct list_head *head; 623 struct list_head *head;
627 int count = 0; 624 int count = 0;
628 625
629 DRM_DEBUG_KMS("%s:buf_id[%d]\n", __func__, qbuf->buf_id); 626 DRM_DEBUG_KMS("buf_id[%d]\n", qbuf->buf_id);
630 627
631 /* source/destination memory list */ 628 /* source/destination memory list */
632 head = &c_node->mem_list[qbuf->ops_id]; 629 head = &c_node->mem_list[qbuf->ops_id];
633 630
634 /* find memory node from memory list */ 631 /* find memory node from memory list */
635 list_for_each_entry(m_node, head, list) { 632 list_for_each_entry(m_node, head, list) {
636 DRM_DEBUG_KMS("%s:count[%d]m_node[0x%x]\n", 633 DRM_DEBUG_KMS("count[%d]m_node[0x%x]\n", count++, (int)m_node);
637 __func__, count++, (int)m_node);
638 634
639 /* compare buffer id */ 635 /* compare buffer id */
640 if (m_node->buf_id == qbuf->buf_id) 636 if (m_node->buf_id == qbuf->buf_id)
@@ -651,7 +647,7 @@ static int ipp_set_mem_node(struct exynos_drm_ippdrv *ippdrv,
651 struct exynos_drm_ipp_ops *ops = NULL; 647 struct exynos_drm_ipp_ops *ops = NULL;
652 int ret = 0; 648 int ret = 0;
653 649
654 DRM_DEBUG_KMS("%s:node[0x%x]\n", __func__, (int)m_node); 650 DRM_DEBUG_KMS("node[0x%x]\n", (int)m_node);
655 651
656 if (!m_node) { 652 if (!m_node) {
657 DRM_ERROR("invalid queue node.\n"); 653 DRM_ERROR("invalid queue node.\n");
@@ -660,7 +656,7 @@ static int ipp_set_mem_node(struct exynos_drm_ippdrv *ippdrv,
660 656
661 mutex_lock(&c_node->mem_lock); 657 mutex_lock(&c_node->mem_lock);
662 658
663 DRM_DEBUG_KMS("%s:ops_id[%d]\n", __func__, m_node->ops_id); 659 DRM_DEBUG_KMS("ops_id[%d]\n", m_node->ops_id);
664 660
665 /* get operations callback */ 661 /* get operations callback */
666 ops = ippdrv->ops[m_node->ops_id]; 662 ops = ippdrv->ops[m_node->ops_id];
@@ -712,14 +708,11 @@ static struct drm_exynos_ipp_mem_node
712 m_node->prop_id = qbuf->prop_id; 708 m_node->prop_id = qbuf->prop_id;
713 m_node->buf_id = qbuf->buf_id; 709 m_node->buf_id = qbuf->buf_id;
714 710
715 DRM_DEBUG_KMS("%s:m_node[0x%x]ops_id[%d]\n", __func__, 711 DRM_DEBUG_KMS("m_node[0x%x]ops_id[%d]\n", (int)m_node, qbuf->ops_id);
716 (int)m_node, qbuf->ops_id); 712 DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]\n", qbuf->prop_id, m_node->buf_id);
717 DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]\n", __func__,
718 qbuf->prop_id, m_node->buf_id);
719 713
720 for_each_ipp_planar(i) { 714 for_each_ipp_planar(i) {
721 DRM_DEBUG_KMS("%s:i[%d]handle[0x%x]\n", __func__, 715 DRM_DEBUG_KMS("i[%d]handle[0x%x]\n", i, qbuf->handle[i]);
722 i, qbuf->handle[i]);
723 716
724 /* get dma address by handle */ 717 /* get dma address by handle */
725 if (qbuf->handle[i]) { 718 if (qbuf->handle[i]) {
@@ -732,9 +725,8 @@ static struct drm_exynos_ipp_mem_node
732 725
733 buf_info.handles[i] = qbuf->handle[i]; 726 buf_info.handles[i] = qbuf->handle[i];
734 buf_info.base[i] = *(dma_addr_t *) addr; 727 buf_info.base[i] = *(dma_addr_t *) addr;
735 DRM_DEBUG_KMS("%s:i[%d]base[0x%x]hd[0x%x]\n", 728 DRM_DEBUG_KMS("i[%d]base[0x%x]hd[0x%x]\n",
736 __func__, i, buf_info.base[i], 729 i, buf_info.base[i], (int)buf_info.handles[i]);
737 (int)buf_info.handles[i]);
738 } 730 }
739 } 731 }
740 732
@@ -758,7 +750,7 @@ static int ipp_put_mem_node(struct drm_device *drm_dev,
758{ 750{
759 int i; 751 int i;
760 752
761 DRM_DEBUG_KMS("%s:node[0x%x]\n", __func__, (int)m_node); 753 DRM_DEBUG_KMS("node[0x%x]\n", (int)m_node);
762 754
763 if (!m_node) { 755 if (!m_node) {
764 DRM_ERROR("invalid dequeue node.\n"); 756 DRM_ERROR("invalid dequeue node.\n");
@@ -772,7 +764,7 @@ static int ipp_put_mem_node(struct drm_device *drm_dev,
772 764
773 mutex_lock(&c_node->mem_lock); 765 mutex_lock(&c_node->mem_lock);
774 766
775 DRM_DEBUG_KMS("%s:ops_id[%d]\n", __func__, m_node->ops_id); 767 DRM_DEBUG_KMS("ops_id[%d]\n", m_node->ops_id);
776 768
777 /* put gem buffer */ 769 /* put gem buffer */
778 for_each_ipp_planar(i) { 770 for_each_ipp_planar(i) {
@@ -804,8 +796,7 @@ static int ipp_get_event(struct drm_device *drm_dev,
804 struct drm_exynos_ipp_send_event *e; 796 struct drm_exynos_ipp_send_event *e;
805 unsigned long flags; 797 unsigned long flags;
806 798
807 DRM_DEBUG_KMS("%s:ops_id[%d]buf_id[%d]\n", __func__, 799 DRM_DEBUG_KMS("ops_id[%d]buf_id[%d]\n", qbuf->ops_id, qbuf->buf_id);
808 qbuf->ops_id, qbuf->buf_id);
809 800
810 e = kzalloc(sizeof(*e), GFP_KERNEL); 801 e = kzalloc(sizeof(*e), GFP_KERNEL);
811 802
@@ -838,13 +829,12 @@ static void ipp_put_event(struct drm_exynos_ipp_cmd_node *c_node,
838 int count = 0; 829 int count = 0;
839 830
840 if (list_empty(&c_node->event_list)) { 831 if (list_empty(&c_node->event_list)) {
841 DRM_DEBUG_KMS("%s:event_list is empty.\n", __func__); 832 DRM_DEBUG_KMS("event_list is empty.\n");
842 return; 833 return;
843 } 834 }
844 835
845 list_for_each_entry_safe(e, te, &c_node->event_list, base.link) { 836 list_for_each_entry_safe(e, te, &c_node->event_list, base.link) {
846 DRM_DEBUG_KMS("%s:count[%d]e[0x%x]\n", 837 DRM_DEBUG_KMS("count[%d]e[0x%x]\n", count++, (int)e);
847 __func__, count++, (int)e);
848 838
849 /* 839 /*
850 * quf == NULL condition means all event deletion. 840 * quf == NULL condition means all event deletion.
@@ -905,12 +895,12 @@ static int ipp_queue_buf_with_run(struct device *dev,
905 property = &c_node->property; 895 property = &c_node->property;
906 896
907 if (c_node->state != IPP_STATE_START) { 897 if (c_node->state != IPP_STATE_START) {
908 DRM_DEBUG_KMS("%s:bypass for invalid state.\n" , __func__); 898 DRM_DEBUG_KMS("bypass for invalid state.\n");
909 return 0; 899 return 0;
910 } 900 }
911 901
912 if (!ipp_check_mem_list(c_node)) { 902 if (!ipp_check_mem_list(c_node)) {
913 DRM_DEBUG_KMS("%s:empty memory.\n", __func__); 903 DRM_DEBUG_KMS("empty memory.\n");
914 return 0; 904 return 0;
915 } 905 }
916 906
@@ -973,8 +963,8 @@ int exynos_drm_ipp_queue_buf(struct drm_device *drm_dev, void *data,
973 return -EINVAL; 963 return -EINVAL;
974 } 964 }
975 965
976 DRM_DEBUG_KMS("%s:prop_id[%d]ops_id[%s]buf_id[%d]buf_type[%d]\n", 966 DRM_DEBUG_KMS("prop_id[%d]ops_id[%s]buf_id[%d]buf_type[%d]\n",
977 __func__, qbuf->prop_id, qbuf->ops_id ? "dst" : "src", 967 qbuf->prop_id, qbuf->ops_id ? "dst" : "src",
978 qbuf->buf_id, qbuf->buf_type); 968 qbuf->buf_id, qbuf->buf_type);
979 969
980 /* find command node */ 970 /* find command node */
@@ -1106,7 +1096,7 @@ int exynos_drm_ipp_cmd_ctrl(struct drm_device *drm_dev, void *data,
1106 return -EINVAL; 1096 return -EINVAL;
1107 } 1097 }
1108 1098
1109 DRM_DEBUG_KMS("%s:ctrl[%d]prop_id[%d]\n", __func__, 1099 DRM_DEBUG_KMS("ctrl[%d]prop_id[%d]\n",
1110 cmd_ctrl->ctrl, cmd_ctrl->prop_id); 1100 cmd_ctrl->ctrl, cmd_ctrl->prop_id);
1111 1101
1112 ippdrv = ipp_find_drv_by_handle(cmd_ctrl->prop_id); 1102 ippdrv = ipp_find_drv_by_handle(cmd_ctrl->prop_id);
@@ -1181,7 +1171,7 @@ int exynos_drm_ipp_cmd_ctrl(struct drm_device *drm_dev, void *data,
1181 return -EINVAL; 1171 return -EINVAL;
1182 } 1172 }
1183 1173
1184 DRM_DEBUG_KMS("%s:done ctrl[%d]prop_id[%d]\n", __func__, 1174 DRM_DEBUG_KMS("done ctrl[%d]prop_id[%d]\n",
1185 cmd_ctrl->ctrl, cmd_ctrl->prop_id); 1175 cmd_ctrl->ctrl, cmd_ctrl->prop_id);
1186 1176
1187 return 0; 1177 return 0;
@@ -1217,7 +1207,7 @@ static int ipp_set_property(struct exynos_drm_ippdrv *ippdrv,
1217 return -EINVAL; 1207 return -EINVAL;
1218 } 1208 }
1219 1209
1220 DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id); 1210 DRM_DEBUG_KMS("prop_id[%d]\n", property->prop_id);
1221 1211
1222 /* reset h/w block */ 1212 /* reset h/w block */
1223 if (ippdrv->reset && 1213 if (ippdrv->reset &&
@@ -1278,13 +1268,13 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
1278 struct list_head *head; 1268 struct list_head *head;
1279 int ret, i; 1269 int ret, i;
1280 1270
1281 DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id); 1271 DRM_DEBUG_KMS("prop_id[%d]\n", property->prop_id);
1282 1272
1283 /* store command info in ippdrv */ 1273 /* store command info in ippdrv */
1284 ippdrv->c_node = c_node; 1274 ippdrv->c_node = c_node;
1285 1275
1286 if (!ipp_check_mem_list(c_node)) { 1276 if (!ipp_check_mem_list(c_node)) {
1287 DRM_DEBUG_KMS("%s:empty memory.\n", __func__); 1277 DRM_DEBUG_KMS("empty memory.\n");
1288 return -ENOMEM; 1278 return -ENOMEM;
1289 } 1279 }
1290 1280
@@ -1311,8 +1301,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
1311 return ret; 1301 return ret;
1312 } 1302 }
1313 1303
1314 DRM_DEBUG_KMS("%s:m_node[0x%x]\n", 1304 DRM_DEBUG_KMS("m_node[0x%x]\n", (int)m_node);
1315 __func__, (int)m_node);
1316 1305
1317 ret = ipp_set_mem_node(ippdrv, c_node, m_node); 1306 ret = ipp_set_mem_node(ippdrv, c_node, m_node);
1318 if (ret) { 1307 if (ret) {
@@ -1350,7 +1339,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
1350 return -EINVAL; 1339 return -EINVAL;
1351 } 1340 }
1352 1341
1353 DRM_DEBUG_KMS("%s:cmd[%d]\n", __func__, property->cmd); 1342 DRM_DEBUG_KMS("cmd[%d]\n", property->cmd);
1354 1343
1355 /* start operations */ 1344 /* start operations */
1356 if (ippdrv->start) { 1345 if (ippdrv->start) {
@@ -1373,7 +1362,7 @@ static int ipp_stop_property(struct drm_device *drm_dev,
1373 struct list_head *head; 1362 struct list_head *head;
1374 int ret = 0, i; 1363 int ret = 0, i;
1375 1364
1376 DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id); 1365 DRM_DEBUG_KMS("prop_id[%d]\n", property->prop_id);
1377 1366
1378 /* put event */ 1367 /* put event */
1379 ipp_put_event(c_node, NULL); 1368 ipp_put_event(c_node, NULL);
@@ -1386,8 +1375,7 @@ static int ipp_stop_property(struct drm_device *drm_dev,
1386 head = &c_node->mem_list[i]; 1375 head = &c_node->mem_list[i];
1387 1376
1388 if (list_empty(head)) { 1377 if (list_empty(head)) {
1389 DRM_DEBUG_KMS("%s:mem_list is empty.\n", 1378 DRM_DEBUG_KMS("mem_list is empty.\n");
1390 __func__);
1391 break; 1379 break;
1392 } 1380 }
1393 1381
@@ -1407,7 +1395,7 @@ static int ipp_stop_property(struct drm_device *drm_dev,
1407 head = &c_node->mem_list[EXYNOS_DRM_OPS_DST]; 1395 head = &c_node->mem_list[EXYNOS_DRM_OPS_DST];
1408 1396
1409 if (list_empty(head)) { 1397 if (list_empty(head)) {
1410 DRM_DEBUG_KMS("%s:mem_list is empty.\n", __func__); 1398 DRM_DEBUG_KMS("mem_list is empty.\n");
1411 break; 1399 break;
1412 } 1400 }
1413 1401
@@ -1424,7 +1412,7 @@ static int ipp_stop_property(struct drm_device *drm_dev,
1424 head = &c_node->mem_list[EXYNOS_DRM_OPS_SRC]; 1412 head = &c_node->mem_list[EXYNOS_DRM_OPS_SRC];
1425 1413
1426 if (list_empty(head)) { 1414 if (list_empty(head)) {
1427 DRM_DEBUG_KMS("%s:mem_list is empty.\n", __func__); 1415 DRM_DEBUG_KMS("mem_list is empty.\n");
1428 break; 1416 break;
1429 } 1417 }
1430 1418
@@ -1516,7 +1504,7 @@ void ipp_sched_cmd(struct work_struct *work)
1516 break; 1504 break;
1517 } 1505 }
1518 1506
1519 DRM_DEBUG_KMS("%s:ctrl[%d] done.\n", __func__, cmd_work->ctrl); 1507 DRM_DEBUG_KMS("ctrl[%d] done.\n", cmd_work->ctrl);
1520 1508
1521err_unlock: 1509err_unlock:
1522 mutex_unlock(&c_node->cmd_lock); 1510 mutex_unlock(&c_node->cmd_lock);
@@ -1537,8 +1525,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
1537 int ret, i; 1525 int ret, i;
1538 1526
1539 for_each_ipp_ops(i) 1527 for_each_ipp_ops(i)
1540 DRM_DEBUG_KMS("%s:%s buf_id[%d]\n", __func__, 1528 DRM_DEBUG_KMS("%s buf_id[%d]\n", i ? "dst" : "src", buf_id[i]);
1541 i ? "dst" : "src", buf_id[i]);
1542 1529
1543 if (!drm_dev) { 1530 if (!drm_dev) {
1544 DRM_ERROR("failed to get drm_dev.\n"); 1531 DRM_ERROR("failed to get drm_dev.\n");
@@ -1551,12 +1538,12 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
1551 } 1538 }
1552 1539
1553 if (list_empty(&c_node->event_list)) { 1540 if (list_empty(&c_node->event_list)) {
1554 DRM_DEBUG_KMS("%s:event list is empty.\n", __func__); 1541 DRM_DEBUG_KMS("event list is empty.\n");
1555 return 0; 1542 return 0;
1556 } 1543 }
1557 1544
1558 if (!ipp_check_mem_list(c_node)) { 1545 if (!ipp_check_mem_list(c_node)) {
1559 DRM_DEBUG_KMS("%s:empty memory.\n", __func__); 1546 DRM_DEBUG_KMS("empty memory.\n");
1560 return 0; 1547 return 0;
1561 } 1548 }
1562 1549
@@ -1575,7 +1562,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
1575 } 1562 }
1576 1563
1577 tbuf_id[i] = m_node->buf_id; 1564 tbuf_id[i] = m_node->buf_id;
1578 DRM_DEBUG_KMS("%s:%s buf_id[%d]\n", __func__, 1565 DRM_DEBUG_KMS("%s buf_id[%d]\n",
1579 i ? "dst" : "src", tbuf_id[i]); 1566 i ? "dst" : "src", tbuf_id[i]);
1580 1567
1581 ret = ipp_put_mem_node(drm_dev, c_node, m_node); 1568 ret = ipp_put_mem_node(drm_dev, c_node, m_node);
@@ -1643,8 +1630,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
1643 } 1630 }
1644 1631
1645 do_gettimeofday(&now); 1632 do_gettimeofday(&now);
1646 DRM_DEBUG_KMS("%s:tv_sec[%ld]tv_usec[%ld]\n" 1633 DRM_DEBUG_KMS("tv_sec[%ld]tv_usec[%ld]\n", now.tv_sec, now.tv_usec);
1647 , __func__, now.tv_sec, now.tv_usec);
1648 e->event.tv_sec = now.tv_sec; 1634 e->event.tv_sec = now.tv_sec;
1649 e->event.tv_usec = now.tv_usec; 1635 e->event.tv_usec = now.tv_usec;
1650 e->event.prop_id = property->prop_id; 1636 e->event.prop_id = property->prop_id;
@@ -1658,7 +1644,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
1658 wake_up_interruptible(&e->base.file_priv->event_wait); 1644 wake_up_interruptible(&e->base.file_priv->event_wait);
1659 spin_unlock_irqrestore(&drm_dev->event_lock, flags); 1645 spin_unlock_irqrestore(&drm_dev->event_lock, flags);
1660 1646
1661 DRM_DEBUG_KMS("%s:done cmd[%d]prop_id[%d]buf_id[%d]\n", __func__, 1647 DRM_DEBUG_KMS("done cmd[%d]prop_id[%d]buf_id[%d]\n",
1662 property->cmd, property->prop_id, tbuf_id[EXYNOS_DRM_OPS_DST]); 1648 property->cmd, property->prop_id, tbuf_id[EXYNOS_DRM_OPS_DST]);
1663 1649
1664 return 0; 1650 return 0;
@@ -1677,8 +1663,7 @@ void ipp_sched_event(struct work_struct *work)
1677 return; 1663 return;
1678 } 1664 }
1679 1665
1680 DRM_DEBUG_KMS("%s:buf_id[%d]\n", __func__, 1666 DRM_DEBUG_KMS("buf_id[%d]\n", event_work->buf_id[EXYNOS_DRM_OPS_DST]);
1681 event_work->buf_id[EXYNOS_DRM_OPS_DST]);
1682 1667
1683 ippdrv = event_work->ippdrv; 1668 ippdrv = event_work->ippdrv;
1684 if (!ippdrv) { 1669 if (!ippdrv) {
@@ -1699,8 +1684,8 @@ void ipp_sched_event(struct work_struct *work)
1699 * or going out operations. 1684 * or going out operations.
1700 */ 1685 */
1701 if (c_node->state != IPP_STATE_START) { 1686 if (c_node->state != IPP_STATE_START) {
1702 DRM_DEBUG_KMS("%s:bypass state[%d]prop_id[%d]\n", 1687 DRM_DEBUG_KMS("bypass state[%d]prop_id[%d]\n",
1703 __func__, c_node->state, c_node->property.prop_id); 1688 c_node->state, c_node->property.prop_id);
1704 goto err_completion; 1689 goto err_completion;
1705 } 1690 }
1706 1691
@@ -1736,7 +1721,7 @@ static int ipp_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
1736 goto err_idr; 1721 goto err_idr;
1737 } 1722 }
1738 1723
1739 DRM_DEBUG_KMS("%s:count[%d]ippdrv[0x%x]ipp_id[%d]\n", __func__, 1724 DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]ipp_id[%d]\n",
1740 count++, (int)ippdrv, ippdrv->ipp_id); 1725 count++, (int)ippdrv, ippdrv->ipp_id);
1741 1726
1742 if (ippdrv->ipp_id == 0) { 1727 if (ippdrv->ipp_id == 0) {
@@ -1806,7 +1791,7 @@ static int ipp_subdrv_open(struct drm_device *drm_dev, struct device *dev,
1806 1791
1807 INIT_LIST_HEAD(&priv->event_list); 1792 INIT_LIST_HEAD(&priv->event_list);
1808 1793
1809 DRM_DEBUG_KMS("%s:done priv[0x%x]\n", __func__, (int)priv); 1794 DRM_DEBUG_KMS("done priv[0x%x]\n", (int)priv);
1810 1795
1811 return 0; 1796 return 0;
1812} 1797}
@@ -1820,10 +1805,10 @@ static void ipp_subdrv_close(struct drm_device *drm_dev, struct device *dev,
1820 struct drm_exynos_ipp_cmd_node *c_node, *tc_node; 1805 struct drm_exynos_ipp_cmd_node *c_node, *tc_node;
1821 int count = 0; 1806 int count = 0;
1822 1807
1823 DRM_DEBUG_KMS("%s:for priv[0x%x]\n", __func__, (int)priv); 1808 DRM_DEBUG_KMS("for priv[0x%x]\n", (int)priv);
1824 1809
1825 if (list_empty(&exynos_drm_ippdrv_list)) { 1810 if (list_empty(&exynos_drm_ippdrv_list)) {
1826 DRM_DEBUG_KMS("%s:ippdrv_list is empty.\n", __func__); 1811 DRM_DEBUG_KMS("ippdrv_list is empty.\n");
1827 goto err_clear; 1812 goto err_clear;
1828 } 1813 }
1829 1814
@@ -1833,8 +1818,8 @@ static void ipp_subdrv_close(struct drm_device *drm_dev, struct device *dev,
1833 1818
1834 list_for_each_entry_safe(c_node, tc_node, 1819 list_for_each_entry_safe(c_node, tc_node,
1835 &ippdrv->cmd_list, list) { 1820 &ippdrv->cmd_list, list) {
1836 DRM_DEBUG_KMS("%s:count[%d]ippdrv[0x%x]\n", 1821 DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]\n",
1837 __func__, count++, (int)ippdrv); 1822 count++, (int)ippdrv);
1838 1823
1839 if (c_node->priv == priv) { 1824 if (c_node->priv == priv) {
1840 /* 1825 /*
@@ -1955,7 +1940,7 @@ static int ipp_remove(struct platform_device *pdev)
1955 1940
1956static int ipp_power_ctrl(struct ipp_context *ctx, bool enable) 1941static int ipp_power_ctrl(struct ipp_context *ctx, bool enable)
1957{ 1942{
1958 DRM_DEBUG_KMS("%s:enable[%d]\n", __func__, enable); 1943 DRM_DEBUG_KMS("enable[%d]\n", enable);
1959 1944
1960 return 0; 1945 return 0;
1961} 1946}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index b811e5c24f94..427640aa5148 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -244,7 +244,7 @@ static int rotator_src_set_size(struct device *dev, int swap,
244 /* Get format */ 244 /* Get format */
245 fmt = rotator_reg_get_fmt(rot); 245 fmt = rotator_reg_get_fmt(rot);
246 if (!rotator_check_reg_fmt(fmt)) { 246 if (!rotator_check_reg_fmt(fmt)) {
247 DRM_ERROR("%s:invalid format.\n", __func__); 247 DRM_ERROR("invalid format.\n");
248 return -EINVAL; 248 return -EINVAL;
249 } 249 }
250 250
@@ -287,7 +287,7 @@ static int rotator_src_set_addr(struct device *dev,
287 /* Get format */ 287 /* Get format */
288 fmt = rotator_reg_get_fmt(rot); 288 fmt = rotator_reg_get_fmt(rot);
289 if (!rotator_check_reg_fmt(fmt)) { 289 if (!rotator_check_reg_fmt(fmt)) {
290 DRM_ERROR("%s:invalid format.\n", __func__); 290 DRM_ERROR("invalid format.\n");
291 return -EINVAL; 291 return -EINVAL;
292 } 292 }
293 293
@@ -381,7 +381,7 @@ static int rotator_dst_set_size(struct device *dev, int swap,
381 /* Get format */ 381 /* Get format */
382 fmt = rotator_reg_get_fmt(rot); 382 fmt = rotator_reg_get_fmt(rot);
383 if (!rotator_check_reg_fmt(fmt)) { 383 if (!rotator_check_reg_fmt(fmt)) {
384 DRM_ERROR("%s:invalid format.\n", __func__); 384 DRM_ERROR("invalid format.\n");
385 return -EINVAL; 385 return -EINVAL;
386 } 386 }
387 387
@@ -422,7 +422,7 @@ static int rotator_dst_set_addr(struct device *dev,
422 /* Get format */ 422 /* Get format */
423 fmt = rotator_reg_get_fmt(rot); 423 fmt = rotator_reg_get_fmt(rot);
424 if (!rotator_check_reg_fmt(fmt)) { 424 if (!rotator_check_reg_fmt(fmt)) {
425 DRM_ERROR("%s:invalid format.\n", __func__); 425 DRM_ERROR("invalid format.\n");
426 return -EINVAL; 426 return -EINVAL;
427 } 427 }
428 428
@@ -500,7 +500,7 @@ static inline bool rotator_check_drm_fmt(u32 fmt)
500 case DRM_FORMAT_NV12: 500 case DRM_FORMAT_NV12:
501 return true; 501 return true;
502 default: 502 default:
503 DRM_DEBUG_KMS("%s:not support format\n", __func__); 503 DRM_DEBUG_KMS("not support format\n");
504 return false; 504 return false;
505 } 505 }
506} 506}
@@ -514,7 +514,7 @@ static inline bool rotator_check_drm_flip(enum drm_exynos_flip flip)
514 case EXYNOS_DRM_FLIP_BOTH: 514 case EXYNOS_DRM_FLIP_BOTH:
515 return true; 515 return true;
516 default: 516 default:
517 DRM_DEBUG_KMS("%s:invalid flip\n", __func__); 517 DRM_DEBUG_KMS("invalid flip\n");
518 return false; 518 return false;
519 } 519 }
520} 520}
@@ -534,19 +534,18 @@ static int rotator_ippdrv_check_property(struct device *dev,
534 534
535 /* Check format configuration */ 535 /* Check format configuration */
536 if (src_config->fmt != dst_config->fmt) { 536 if (src_config->fmt != dst_config->fmt) {
537 DRM_DEBUG_KMS("%s:not support csc feature\n", __func__); 537 DRM_DEBUG_KMS("not support csc feature\n");
538 return -EINVAL; 538 return -EINVAL;
539 } 539 }
540 540
541 if (!rotator_check_drm_fmt(dst_config->fmt)) { 541 if (!rotator_check_drm_fmt(dst_config->fmt)) {
542 DRM_DEBUG_KMS("%s:invalid format\n", __func__); 542 DRM_DEBUG_KMS("invalid format\n");
543 return -EINVAL; 543 return -EINVAL;
544 } 544 }
545 545
546 /* Check transform configuration */ 546 /* Check transform configuration */
547 if (src_config->degree != EXYNOS_DRM_DEGREE_0) { 547 if (src_config->degree != EXYNOS_DRM_DEGREE_0) {
548 DRM_DEBUG_KMS("%s:not support source-side rotation\n", 548 DRM_DEBUG_KMS("not support source-side rotation\n");
549 __func__);
550 return -EINVAL; 549 return -EINVAL;
551 } 550 }
552 551
@@ -559,51 +558,47 @@ static int rotator_ippdrv_check_property(struct device *dev,
559 /* No problem */ 558 /* No problem */
560 break; 559 break;
561 default: 560 default:
562 DRM_DEBUG_KMS("%s:invalid degree\n", __func__); 561 DRM_DEBUG_KMS("invalid degree\n");
563 return -EINVAL; 562 return -EINVAL;
564 } 563 }
565 564
566 if (src_config->flip != EXYNOS_DRM_FLIP_NONE) { 565 if (src_config->flip != EXYNOS_DRM_FLIP_NONE) {
567 DRM_DEBUG_KMS("%s:not support source-side flip\n", __func__); 566 DRM_DEBUG_KMS("not support source-side flip\n");
568 return -EINVAL; 567 return -EINVAL;
569 } 568 }
570 569
571 if (!rotator_check_drm_flip(dst_config->flip)) { 570 if (!rotator_check_drm_flip(dst_config->flip)) {
572 DRM_DEBUG_KMS("%s:invalid flip\n", __func__); 571 DRM_DEBUG_KMS("invalid flip\n");
573 return -EINVAL; 572 return -EINVAL;
574 } 573 }
575 574
576 /* Check size configuration */ 575 /* Check size configuration */
577 if ((src_pos->x + src_pos->w > src_sz->hsize) || 576 if ((src_pos->x + src_pos->w > src_sz->hsize) ||
578 (src_pos->y + src_pos->h > src_sz->vsize)) { 577 (src_pos->y + src_pos->h > src_sz->vsize)) {
579 DRM_DEBUG_KMS("%s:out of source buffer bound\n", __func__); 578 DRM_DEBUG_KMS("out of source buffer bound\n");
580 return -EINVAL; 579 return -EINVAL;
581 } 580 }
582 581
583 if (swap) { 582 if (swap) {
584 if ((dst_pos->x + dst_pos->h > dst_sz->vsize) || 583 if ((dst_pos->x + dst_pos->h > dst_sz->vsize) ||
585 (dst_pos->y + dst_pos->w > dst_sz->hsize)) { 584 (dst_pos->y + dst_pos->w > dst_sz->hsize)) {
586 DRM_DEBUG_KMS("%s:out of destination buffer bound\n", 585 DRM_DEBUG_KMS("out of destination buffer bound\n");
587 __func__);
588 return -EINVAL; 586 return -EINVAL;
589 } 587 }
590 588
591 if ((src_pos->w != dst_pos->h) || (src_pos->h != dst_pos->w)) { 589 if ((src_pos->w != dst_pos->h) || (src_pos->h != dst_pos->w)) {
592 DRM_DEBUG_KMS("%s:not support scale feature\n", 590 DRM_DEBUG_KMS("not support scale feature\n");
593 __func__);
594 return -EINVAL; 591 return -EINVAL;
595 } 592 }
596 } else { 593 } else {
597 if ((dst_pos->x + dst_pos->w > dst_sz->hsize) || 594 if ((dst_pos->x + dst_pos->w > dst_sz->hsize) ||
598 (dst_pos->y + dst_pos->h > dst_sz->vsize)) { 595 (dst_pos->y + dst_pos->h > dst_sz->vsize)) {
599 DRM_DEBUG_KMS("%s:out of destination buffer bound\n", 596 DRM_DEBUG_KMS("out of destination buffer bound\n");
600 __func__);
601 return -EINVAL; 597 return -EINVAL;
602 } 598 }
603 599
604 if ((src_pos->w != dst_pos->w) || (src_pos->h != dst_pos->h)) { 600 if ((src_pos->w != dst_pos->w) || (src_pos->h != dst_pos->h)) {
605 DRM_DEBUG_KMS("%s:not support scale feature\n", 601 DRM_DEBUG_KMS("not support scale feature\n");
606 __func__);
607 return -EINVAL; 602 return -EINVAL;
608 } 603 }
609 } 604 }
@@ -691,7 +686,7 @@ static int rotator_probe(struct platform_device *pdev)
691 goto err_ippdrv_register; 686 goto err_ippdrv_register;
692 } 687 }
693 688
694 DRM_DEBUG_KMS("%s:ippdrv[0x%x]\n", __func__, (int)ippdrv); 689 DRM_DEBUG_KMS("ippdrv[0x%x]\n", (int)ippdrv);
695 690
696 platform_set_drvdata(pdev, rot); 691 platform_set_drvdata(pdev, rot);
697 692
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 67692a362c6e..65bb9841317b 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1634,8 +1634,8 @@ static void hdmi_mode_set(void *ctx, struct drm_display_mode *mode)
1634 struct hdmi_context *hdata = ctx; 1634 struct hdmi_context *hdata = ctx;
1635 struct drm_display_mode *m = mode; 1635 struct drm_display_mode *m = mode;
1636 1636
1637 DRM_DEBUG_KMS("[%s]: xres=%d, yres=%d, refresh=%d, intl=%s\n", 1637 DRM_DEBUG_KMS("xres=%d, yres=%d, refresh=%d, intl=%s\n",
1638 __func__, m->hdisplay, m->vdisplay, 1638 m->hdisplay, m->vdisplay,
1639 m->vrefresh, (m->flags & DRM_MODE_FLAG_INTERLACE) ? 1639 m->vrefresh, (m->flags & DRM_MODE_FLAG_INTERLACE) ?
1640 "INTERLACED" : "PROGERESSIVE"); 1640 "INTERLACED" : "PROGERESSIVE");
1641 1641
@@ -1723,7 +1723,7 @@ static void hdmi_dpms(void *ctx, int mode)
1723{ 1723{
1724 struct hdmi_context *hdata = ctx; 1724 struct hdmi_context *hdata = ctx;
1725 1725
1726 DRM_DEBUG_KMS("[%d] %s mode %d\n", __LINE__, __func__, mode); 1726 DRM_DEBUG_KMS("mode %d\n", mode);
1727 1727
1728 switch (mode) { 1728 switch (mode) {
1729 case DRM_MODE_DPMS_ON: 1729 case DRM_MODE_DPMS_ON:
@@ -2073,7 +2073,7 @@ static int hdmi_suspend(struct device *dev)
2073 drm_helper_hpd_irq_event(ctx->drm_dev); 2073 drm_helper_hpd_irq_event(ctx->drm_dev);
2074 2074
2075 if (pm_runtime_suspended(dev)) { 2075 if (pm_runtime_suspended(dev)) {
2076 DRM_DEBUG_KMS("%s : Already suspended\n", __func__); 2076 DRM_DEBUG_KMS("Already suspended\n");
2077 return 0; 2077 return 0;
2078 } 2078 }
2079 2079
@@ -2092,7 +2092,7 @@ static int hdmi_resume(struct device *dev)
2092 enable_irq(hdata->irq); 2092 enable_irq(hdata->irq);
2093 2093
2094 if (!pm_runtime_suspended(dev)) { 2094 if (!pm_runtime_suspended(dev)) {
2095 DRM_DEBUG_KMS("%s : Already resumed\n", __func__); 2095 DRM_DEBUG_KMS("Already resumed\n");
2096 return 0; 2096 return 0;
2097 } 2097 }
2098 2098
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index e84f9e9fcd74..1f4cec12e326 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -770,7 +770,7 @@ static void mixer_win_commit(void *ctx, int win)
770{ 770{
771 struct mixer_context *mixer_ctx = ctx; 771 struct mixer_context *mixer_ctx = ctx;
772 772
773 DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win); 773 DRM_DEBUG_KMS("win: %d\n", win);
774 774
775 mutex_lock(&mixer_ctx->mixer_mutex); 775 mutex_lock(&mixer_ctx->mixer_mutex);
776 if (!mixer_ctx->powered) { 776 if (!mixer_ctx->powered) {
@@ -793,7 +793,7 @@ static void mixer_win_disable(void *ctx, int win)
793 struct mixer_resources *res = &mixer_ctx->mixer_res; 793 struct mixer_resources *res = &mixer_ctx->mixer_res;
794 unsigned long flags; 794 unsigned long flags;
795 795
796 DRM_DEBUG_KMS("[%d] %s, win: %d\n", __LINE__, __func__, win); 796 DRM_DEBUG_KMS("win: %d\n", win);
797 797
798 mutex_lock(&mixer_ctx->mixer_mutex); 798 mutex_lock(&mixer_ctx->mixer_mutex);
799 if (!mixer_ctx->powered) { 799 if (!mixer_ctx->powered) {
@@ -1238,7 +1238,7 @@ static int mixer_suspend(struct device *dev)
1238 struct mixer_context *ctx = drm_hdmi_ctx->ctx; 1238 struct mixer_context *ctx = drm_hdmi_ctx->ctx;
1239 1239
1240 if (pm_runtime_suspended(dev)) { 1240 if (pm_runtime_suspended(dev)) {
1241 DRM_DEBUG_KMS("%s : Already suspended\n", __func__); 1241 DRM_DEBUG_KMS("Already suspended\n");
1242 return 0; 1242 return 0;
1243 } 1243 }
1244 1244
@@ -1253,7 +1253,7 @@ static int mixer_resume(struct device *dev)
1253 struct mixer_context *ctx = drm_hdmi_ctx->ctx; 1253 struct mixer_context *ctx = drm_hdmi_ctx->ctx;
1254 1254
1255 if (!pm_runtime_suspended(dev)) { 1255 if (!pm_runtime_suspended(dev)) {
1256 DRM_DEBUG_KMS("%s : Already resumed\n", __func__); 1256 DRM_DEBUG_KMS("Already resumed\n");
1257 return 0; 1257 return 0;
1258 } 1258 }
1259 1259