Skip to content

Commit 5770495

Browse files
committed
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 <[email protected]> From: Inki Dae <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2 parents 35106dd + 472df18 commit 5770495

File tree

3 files changed

+30
-36
lines changed

3 files changed

+30
-36
lines changed

Documentation/devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,21 @@ properties:
8080
- const: vsync
8181
- const: lcd_sys
8282

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+
8398
power-domains:
8499
maxItems: 1
85100

@@ -92,6 +107,7 @@ required:
92107
- clock-names
93108
- interrupts
94109
- interrupt-names
110+
- port
95111
- reg
96112

97113
additionalProperties: false
@@ -118,4 +134,9 @@ examples:
118134
"decon0_vclk";
119135
pinctrl-0 = <&lcd_clk &pwm1_out>;
120136
pinctrl-names = "default";
137+
port {
138+
decon_to_dsi: endpoint {
139+
remote-endpoint = <&dsi_to_decon>;
140+
};
141+
};
121142
};

drivers/gpu/drm/exynos/exynos7_drm_decon.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ struct decon_context {
6969
void __iomem *regs;
7070
unsigned long irq_flags;
7171
bool i80_if;
72-
bool suspended;
7372
wait_queue_head_t wait_vsync_queue;
7473
atomic_t wait_vsync_event;
7574

@@ -132,9 +131,6 @@ static void decon_shadow_protect_win(struct decon_context *ctx,
132131

133132
static void decon_wait_for_vblank(struct decon_context *ctx)
134133
{
135-
if (ctx->suspended)
136-
return;
137-
138134
atomic_set(&ctx->wait_vsync_event, 1);
139135

140136
/*
@@ -210,9 +206,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
210206
struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
211207
u32 val, clkdiv;
212208

213-
if (ctx->suspended)
214-
return;
215-
216209
/* nothing to do if we haven't set the mode yet */
217210
if (mode->htotal == 0 || mode->vtotal == 0)
218211
return;
@@ -274,9 +267,6 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
274267
struct decon_context *ctx = crtc->ctx;
275268
u32 val;
276269

277-
if (ctx->suspended)
278-
return -EPERM;
279-
280270
if (!test_and_set_bit(0, &ctx->irq_flags)) {
281271
val = readl(ctx->regs + VIDINTCON0);
282272

@@ -299,9 +289,6 @@ static void decon_disable_vblank(struct exynos_drm_crtc *crtc)
299289
struct decon_context *ctx = crtc->ctx;
300290
u32 val;
301291

302-
if (ctx->suspended)
303-
return;
304-
305292
if (test_and_clear_bit(0, &ctx->irq_flags)) {
306293
val = readl(ctx->regs + VIDINTCON0);
307294

@@ -404,9 +391,6 @@ static void decon_atomic_begin(struct exynos_drm_crtc *crtc)
404391
struct decon_context *ctx = crtc->ctx;
405392
int i;
406393

407-
if (ctx->suspended)
408-
return;
409-
410394
for (i = 0; i < WINDOWS_NR; i++)
411395
decon_shadow_protect_win(ctx, i, true);
412396
}
@@ -427,9 +411,6 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
427411
unsigned int pitch = fb->pitches[0];
428412
unsigned int vidw_addr0_base = ctx->data->vidw_buf_start_base;
429413

430-
if (ctx->suspended)
431-
return;
432-
433414
/*
434415
* SHADOWCON/PRTCON register is used for enabling timing.
435416
*
@@ -517,9 +498,6 @@ static void decon_disable_plane(struct exynos_drm_crtc *crtc,
517498
unsigned int win = plane->index;
518499
u32 val;
519500

520-
if (ctx->suspended)
521-
return;
522-
523501
/* protect windows */
524502
decon_shadow_protect_win(ctx, win, true);
525503

@@ -538,9 +516,6 @@ static void decon_atomic_flush(struct exynos_drm_crtc *crtc)
538516
struct decon_context *ctx = crtc->ctx;
539517
int i;
540518

541-
if (ctx->suspended)
542-
return;
543-
544519
for (i = 0; i < WINDOWS_NR; i++)
545520
decon_shadow_protect_win(ctx, i, false);
546521
exynos_crtc_handle_event(crtc);
@@ -568,9 +543,6 @@ static void decon_atomic_enable(struct exynos_drm_crtc *crtc)
568543
struct decon_context *ctx = crtc->ctx;
569544
int ret;
570545

571-
if (!ctx->suspended)
572-
return;
573-
574546
ret = pm_runtime_resume_and_get(ctx->dev);
575547
if (ret < 0) {
576548
DRM_DEV_ERROR(ctx->dev, "failed to enable DECON device.\n");
@@ -584,18 +556,13 @@ static void decon_atomic_enable(struct exynos_drm_crtc *crtc)
584556
decon_enable_vblank(ctx->crtc);
585557

586558
decon_commit(ctx->crtc);
587-
588-
ctx->suspended = false;
589559
}
590560

591561
static void decon_atomic_disable(struct exynos_drm_crtc *crtc)
592562
{
593563
struct decon_context *ctx = crtc->ctx;
594564
int i;
595565

596-
if (ctx->suspended)
597-
return;
598-
599566
/*
600567
* We need to make sure that all windows are disabled before we
601568
* suspend that connector. Otherwise we might try to scan from
@@ -605,8 +572,6 @@ static void decon_atomic_disable(struct exynos_drm_crtc *crtc)
605572
decon_disable_plane(crtc, &ctx->planes[i]);
606573

607574
pm_runtime_put_sync(ctx->dev);
608-
609-
ctx->suspended = true;
610575
}
611576

612577
static const struct exynos_drm_crtc_ops decon_crtc_ops = {
@@ -727,7 +692,6 @@ static int decon_probe(struct platform_device *pdev)
727692
return -ENOMEM;
728693

729694
ctx->dev = dev;
730-
ctx->suspended = true;
731695
ctx->data = of_device_get_match_data(dev);
732696

733697
i80_if_timings = of_get_child_by_name(dev->of_node, "i80-if-timings");

drivers/gpu/drm/exynos/exynos_drm_dsi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ static const struct samsung_dsim_plat_data exynos5433_dsi_pdata = {
154154
.host_ops = &exynos_dsi_exynos_host_ops,
155155
};
156156

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+
157162
static const struct of_device_id exynos_dsi_of_match[] = {
158163
{
159164
.compatible = "samsung,exynos3250-mipi-dsi",
@@ -175,6 +180,10 @@ static const struct of_device_id exynos_dsi_of_match[] = {
175180
.compatible = "samsung,exynos5433-mipi-dsi",
176181
.data = &exynos5433_dsi_pdata,
177182
},
183+
{
184+
.compatible = "samsung,exynos7870-mipi-dsi",
185+
.data = &exynos7870_dsi_pdata,
186+
},
178187
{ /* sentinel. */ }
179188
};
180189
MODULE_DEVICE_TABLE(of, exynos_dsi_of_match);

0 commit comments

Comments
 (0)