Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'exynos-drm-next-for-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

New feature
- Add glue layer support for Exynos7870 DSIM in Exynos DSI driver
. Introduces Exynos7870 DSIM bridge integration at Exynos DRM DSI layer.

Bug fixups for exynos7_drm_decon.c module
- Remove redundant ctx->suspended state handling
. Cleans up unused state check logic as call flow is now correctly managed.
. Fixes an issue where decon_commit() was blocked from decon_atomic_enable() due to incorrect state setting.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Inki Dae <inki.dae@samsung.com>
Link: https://lore.kernel.org/r/20250915113543.51294-1-inki.dae@samsung.com

+30 -36
+21
Documentation/devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml
··· 80 80 - const: vsync 81 81 - const: lcd_sys 82 82 83 + iommus: 84 + maxItems: 1 85 + 86 + memory-region: 87 + maxItems: 1 88 + description: 89 + A phandle to a node describing a reserved framebuffer memory region. 90 + For example, the splash memory region set up by the bootloader. 91 + 92 + port: 93 + $ref: /schemas/graph.yaml#/properties/port 94 + description: 95 + Output port which is connected to either a Mobile Image Compressor 96 + (MIC) or a DSI Master device. 97 + 83 98 power-domains: 84 99 maxItems: 1 85 100 ··· 107 92 - clock-names 108 93 - interrupts 109 94 - interrupt-names 95 + - port 110 96 - reg 111 97 112 98 additionalProperties: false ··· 134 118 "decon0_vclk"; 135 119 pinctrl-0 = <&lcd_clk &pwm1_out>; 136 120 pinctrl-names = "default"; 121 + port { 122 + decon_to_dsi: endpoint { 123 + remote-endpoint = <&dsi_to_decon>; 124 + }; 125 + }; 137 126 };
-36
drivers/gpu/drm/exynos/exynos7_drm_decon.c
··· 69 69 void __iomem *regs; 70 70 unsigned long irq_flags; 71 71 bool i80_if; 72 - bool suspended; 73 72 wait_queue_head_t wait_vsync_queue; 74 73 atomic_t wait_vsync_event; 75 74 ··· 131 132 132 133 static void decon_wait_for_vblank(struct decon_context *ctx) 133 134 { 134 - if (ctx->suspended) 135 - return; 136 - 137 135 atomic_set(&ctx->wait_vsync_event, 1); 138 136 139 137 /* ··· 206 210 struct drm_display_mode *mode = &crtc->base.state->adjusted_mode; 207 211 u32 val, clkdiv; 208 212 209 - if (ctx->suspended) 210 - return; 211 - 212 213 /* nothing to do if we haven't set the mode yet */ 213 214 if (mode->htotal == 0 || mode->vtotal == 0) 214 215 return; ··· 267 274 struct decon_context *ctx = crtc->ctx; 268 275 u32 val; 269 276 270 - if (ctx->suspended) 271 - return -EPERM; 272 - 273 277 if (!test_and_set_bit(0, &ctx->irq_flags)) { 274 278 val = readl(ctx->regs + VIDINTCON0); 275 279 ··· 288 298 { 289 299 struct decon_context *ctx = crtc->ctx; 290 300 u32 val; 291 - 292 - if (ctx->suspended) 293 - return; 294 301 295 302 if (test_and_clear_bit(0, &ctx->irq_flags)) { 296 303 val = readl(ctx->regs + VIDINTCON0); ··· 391 404 struct decon_context *ctx = crtc->ctx; 392 405 int i; 393 406 394 - if (ctx->suspended) 395 - return; 396 - 397 407 for (i = 0; i < WINDOWS_NR; i++) 398 408 decon_shadow_protect_win(ctx, i, true); 399 409 } ··· 410 426 unsigned int cpp = fb->format->cpp[0]; 411 427 unsigned int pitch = fb->pitches[0]; 412 428 unsigned int vidw_addr0_base = ctx->data->vidw_buf_start_base; 413 - 414 - if (ctx->suspended) 415 - return; 416 429 417 430 /* 418 431 * SHADOWCON/PRTCON register is used for enabling timing. ··· 498 517 unsigned int win = plane->index; 499 518 u32 val; 500 519 501 - if (ctx->suspended) 502 - return; 503 - 504 520 /* protect windows */ 505 521 decon_shadow_protect_win(ctx, win, true); 506 522 ··· 515 537 { 516 538 struct decon_context *ctx = crtc->ctx; 517 539 int i; 518 - 519 - if (ctx->suspended) 520 - return; 521 540 522 541 for (i = 0; i < WINDOWS_NR; i++) 523 542 decon_shadow_protect_win(ctx, i, false); ··· 543 568 struct decon_context *ctx = crtc->ctx; 544 569 int ret; 545 570 546 - if (!ctx->suspended) 547 - return; 548 - 549 571 ret = pm_runtime_resume_and_get(ctx->dev); 550 572 if (ret < 0) { 551 573 DRM_DEV_ERROR(ctx->dev, "failed to enable DECON device.\n"); ··· 556 584 decon_enable_vblank(ctx->crtc); 557 585 558 586 decon_commit(ctx->crtc); 559 - 560 - ctx->suspended = false; 561 587 } 562 588 563 589 static void decon_atomic_disable(struct exynos_drm_crtc *crtc) 564 590 { 565 591 struct decon_context *ctx = crtc->ctx; 566 592 int i; 567 - 568 - if (ctx->suspended) 569 - return; 570 593 571 594 /* 572 595 * We need to make sure that all windows are disabled before we ··· 572 605 decon_disable_plane(crtc, &ctx->planes[i]); 573 606 574 607 pm_runtime_put_sync(ctx->dev); 575 - 576 - ctx->suspended = true; 577 608 } 578 609 579 610 static const struct exynos_drm_crtc_ops decon_crtc_ops = { ··· 692 727 return -ENOMEM; 693 728 694 729 ctx->dev = dev; 695 - ctx->suspended = true; 696 730 ctx->data = of_device_get_match_data(dev); 697 731 698 732 i80_if_timings = of_get_child_by_name(dev->of_node, "i80-if-timings");
+9
drivers/gpu/drm/exynos/exynos_drm_dsi.c
··· 154 154 .host_ops = &exynos_dsi_exynos_host_ops, 155 155 }; 156 156 157 + static const struct samsung_dsim_plat_data exynos7870_dsi_pdata = { 158 + .hw_type = DSIM_TYPE_EXYNOS7870, 159 + .host_ops = &exynos_dsi_exynos_host_ops, 160 + }; 161 + 157 162 static const struct of_device_id exynos_dsi_of_match[] = { 158 163 { 159 164 .compatible = "samsung,exynos3250-mipi-dsi", ··· 179 174 { 180 175 .compatible = "samsung,exynos5433-mipi-dsi", 181 176 .data = &exynos5433_dsi_pdata, 177 + }, 178 + { 179 + .compatible = "samsung,exynos7870-mipi-dsi", 180 + .data = &exynos7870_dsi_pdata, 182 181 }, 183 182 { /* sentinel. */ } 184 183 };