* [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support
@ 2025-07-06 17:29 Kaustabh Chakraborty
2025-07-06 17:29 ` [PATCH v4 1/2] dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports Kaustabh Chakraborty
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Kaustabh Chakraborty @ 2025-07-06 17:29 UTC (permalink / raw)
To: Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie,
Simona Vetter, Krzysztof Kozlowski, Alim Akhtar,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Conor Dooley, Ajay Kumar, Akshu Agrawal, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel,
devicetree, Kaustabh Chakraborty, stable
This patch series aims at adding support for Exynos7870's DECON in the
Exynos7 DECON driver. It introduces a driver data struct so that support
for DECON on other SoCs can be added to it in the future.
It also fixes a few bugs in the driver, such as functions receiving bad
pointers.
Tested on Samsung Galaxy J7 Prime (samsung-on7xelte), Samsung Galaxy A2
Core (samsung-a2corelte), and Samsung Galaxy J6 (samsung-j6lte).
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
Changes in v4:
- Drop applied patch [v2 3/3].
- Correct documentation of port dt property.
- Add documentation of memory-region.
- Remove redundant ctx->suspended completely.
- Link to v3: https://lore.kernel.org/r/20250627-exynosdrm-decon-v3-0-5b456f88cfea@disroot.org
Changes in v3:
- Add a new commit documenting iommus and ports dt properties.
- Link to v2: https://lore.kernel.org/r/20250612-exynosdrm-decon-v2-0-d6c1d21c8057@disroot.org
Changes in v2:
- Add a new commit to prevent an occasional panic under circumstances.
- Rewrite and redo [v1 2/6] to be a more sensible commit.
- Link to v1: https://lore.kernel.org/r/20240919-exynosdrm-decon-v1-0-6c5861c1cb04@disroot.org
---
Kaustabh Chakraborty (2):
dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports
drm/exynos: exynos7_drm_decon: remove ctx->suspended
.../display/samsung/samsung,exynos7-decon.yaml | 21 +++++++++++++
drivers/gpu/drm/exynos/exynos7_drm_decon.c | 36 ----------------------
2 files changed, 21 insertions(+), 36 deletions(-)
---
base-commit: 26ffb3d6f02cd0935fb9fa3db897767beee1cb2a
change-id: 20240917-exynosdrm-decon-4c228dd1d2bf
Best regards,
--
Kaustabh Chakraborty <kauschluss@disroot.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v4 1/2] dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports
2025-07-06 17:29 [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support Kaustabh Chakraborty
@ 2025-07-06 17:29 ` Kaustabh Chakraborty
2025-07-07 6:36 ` Krzysztof Kozlowski
2025-07-06 17:29 ` [PATCH v4 2/2] drm/exynos: exynos7_drm_decon: remove ctx->suspended Kaustabh Chakraborty
2025-07-29 1:40 ` [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support Inki Dae
2 siblings, 1 reply; 5+ messages in thread
From: Kaustabh Chakraborty @ 2025-07-06 17:29 UTC (permalink / raw)
To: Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie,
Simona Vetter, Krzysztof Kozlowski, Alim Akhtar,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Conor Dooley, Ajay Kumar, Akshu Agrawal, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel,
devicetree, Kaustabh Chakraborty
Similar to FIMD and Exynos5433's DECON, the Exynos7 DECON hardware:
- May optionally require an IOMMU to initialize a display region.
- Outputs image data to another block, say an MIC or a DSI master.
If an IOMMU is present, it may also require to access the reserved
framebuffer region.
Document these bindings in the devicetree schema.
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
.../display/samsung/samsung,exynos7-decon.yaml | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml b/Documentation/devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml
index 53916e4c95d8c0369138941a556c23f5d42fbd39..14b954718008e06aa1627fcd116a61927ce29e99 100644
--- a/Documentation/devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml
+++ b/Documentation/devicetree/bindings/display/samsung/samsung,exynos7-decon.yaml
@@ -80,6 +80,21 @@ properties:
- const: vsync
- const: lcd_sys
+ iommus:
+ maxItems: 1
+
+ memory-region:
+ maxItems: 1
+ description:
+ A phandle to a node describing a reserved framebuffer memory region.
+ For example, the splash memory region set up by the bootloader.
+
+ port:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Output port which is connected to either a Mobile Image Compressor
+ (MIC) or a DSI Master device.
+
power-domains:
maxItems: 1
@@ -92,6 +107,7 @@ required:
- clock-names
- interrupts
- interrupt-names
+ - port
- reg
additionalProperties: false
@@ -118,4 +134,9 @@ examples:
"decon0_vclk";
pinctrl-0 = <&lcd_clk &pwm1_out>;
pinctrl-names = "default";
+ port {
+ decon_to_dsi: endpoint {
+ remote-endpoint = <&dsi_to_decon>;
+ };
+ };
};
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v4 2/2] drm/exynos: exynos7_drm_decon: remove ctx->suspended
2025-07-06 17:29 [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support Kaustabh Chakraborty
2025-07-06 17:29 ` [PATCH v4 1/2] dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports Kaustabh Chakraborty
@ 2025-07-06 17:29 ` Kaustabh Chakraborty
2025-07-29 1:40 ` [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support Inki Dae
2 siblings, 0 replies; 5+ messages in thread
From: Kaustabh Chakraborty @ 2025-07-06 17:29 UTC (permalink / raw)
To: Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie,
Simona Vetter, Krzysztof Kozlowski, Alim Akhtar,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Conor Dooley, Ajay Kumar, Akshu Agrawal, Krzysztof Kozlowski,
Conor Dooley
Cc: dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel,
devicetree, Kaustabh Chakraborty, stable
Condition guards are found to be redundant, as the call flow is properly
managed now, as also observed in the Exynos5433 DECON driver. Since
state checking is no longer necessary, remove it.
This also fixes an issue which prevented decon_commit() from
decon_atomic_enable() due to an incorrect state change setting.
Fixes: 96976c3d9aff ("drm/exynos: Add DECON driver")
Cc: stable@vger.kernel.org
Suggested-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
drivers/gpu/drm/exynos/exynos7_drm_decon.c | 36 ------------------------------
1 file changed, 36 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index f91daefa9d2bc5e314c279822047e60ee0d7ca99..aec6ed5ee356586865c266b0bb2becaa897a8e7c 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -69,7 +69,6 @@ struct decon_context {
void __iomem *regs;
unsigned long irq_flags;
bool i80_if;
- bool suspended;
wait_queue_head_t wait_vsync_queue;
atomic_t wait_vsync_event;
@@ -132,9 +131,6 @@ static void decon_shadow_protect_win(struct decon_context *ctx,
static void decon_wait_for_vblank(struct decon_context *ctx)
{
- if (ctx->suspended)
- return;
-
atomic_set(&ctx->wait_vsync_event, 1);
/*
@@ -210,9 +206,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
u32 val, clkdiv;
- if (ctx->suspended)
- return;
-
/* nothing to do if we haven't set the mode yet */
if (mode->htotal == 0 || mode->vtotal == 0)
return;
@@ -274,9 +267,6 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
struct decon_context *ctx = crtc->ctx;
u32 val;
- if (ctx->suspended)
- return -EPERM;
-
if (!test_and_set_bit(0, &ctx->irq_flags)) {
val = readl(ctx->regs + VIDINTCON0);
@@ -299,9 +289,6 @@ static void decon_disable_vblank(struct exynos_drm_crtc *crtc)
struct decon_context *ctx = crtc->ctx;
u32 val;
- if (ctx->suspended)
- return;
-
if (test_and_clear_bit(0, &ctx->irq_flags)) {
val = readl(ctx->regs + VIDINTCON0);
@@ -404,9 +391,6 @@ static void decon_atomic_begin(struct exynos_drm_crtc *crtc)
struct decon_context *ctx = crtc->ctx;
int i;
- if (ctx->suspended)
- return;
-
for (i = 0; i < WINDOWS_NR; i++)
decon_shadow_protect_win(ctx, i, true);
}
@@ -427,9 +411,6 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
unsigned int pitch = fb->pitches[0];
unsigned int vidw_addr0_base = ctx->data->vidw_buf_start_base;
- if (ctx->suspended)
- return;
-
/*
* SHADOWCON/PRTCON register is used for enabling timing.
*
@@ -517,9 +498,6 @@ static void decon_disable_plane(struct exynos_drm_crtc *crtc,
unsigned int win = plane->index;
u32 val;
- if (ctx->suspended)
- return;
-
/* protect windows */
decon_shadow_protect_win(ctx, win, true);
@@ -538,9 +516,6 @@ static void decon_atomic_flush(struct exynos_drm_crtc *crtc)
struct decon_context *ctx = crtc->ctx;
int i;
- if (ctx->suspended)
- return;
-
for (i = 0; i < WINDOWS_NR; i++)
decon_shadow_protect_win(ctx, i, false);
exynos_crtc_handle_event(crtc);
@@ -568,9 +543,6 @@ static void decon_atomic_enable(struct exynos_drm_crtc *crtc)
struct decon_context *ctx = crtc->ctx;
int ret;
- if (!ctx->suspended)
- return;
-
ret = pm_runtime_resume_and_get(ctx->dev);
if (ret < 0) {
DRM_DEV_ERROR(ctx->dev, "failed to enable DECON device.\n");
@@ -584,8 +556,6 @@ static void decon_atomic_enable(struct exynos_drm_crtc *crtc)
decon_enable_vblank(ctx->crtc);
decon_commit(ctx->crtc);
-
- ctx->suspended = false;
}
static void decon_atomic_disable(struct exynos_drm_crtc *crtc)
@@ -593,9 +563,6 @@ static void decon_atomic_disable(struct exynos_drm_crtc *crtc)
struct decon_context *ctx = crtc->ctx;
int i;
- if (ctx->suspended)
- return;
-
/*
* We need to make sure that all windows are disabled before we
* suspend that connector. Otherwise we might try to scan from
@@ -605,8 +572,6 @@ static void decon_atomic_disable(struct exynos_drm_crtc *crtc)
decon_disable_plane(crtc, &ctx->planes[i]);
pm_runtime_put_sync(ctx->dev);
-
- ctx->suspended = true;
}
static const struct exynos_drm_crtc_ops decon_crtc_ops = {
@@ -723,7 +688,6 @@ static int decon_probe(struct platform_device *pdev)
return -ENOMEM;
ctx->dev = dev;
- ctx->suspended = true;
ctx->data = of_device_get_match_data(dev);
i80_if_timings = of_get_child_by_name(dev->of_node, "i80-if-timings");
--
2.49.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v4 1/2] dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports
2025-07-06 17:29 ` [PATCH v4 1/2] dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports Kaustabh Chakraborty
@ 2025-07-07 6:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-07-07 6:36 UTC (permalink / raw)
To: Kaustabh Chakraborty
Cc: Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie,
Simona Vetter, Alim Akhtar, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Conor Dooley, Ajay Kumar,
Akshu Agrawal, Krzysztof Kozlowski, Conor Dooley, dri-devel,
linux-arm-kernel, linux-samsung-soc, linux-kernel, devicetree
On Sun, Jul 06, 2025 at 10:59:45PM +0530, Kaustabh Chakraborty wrote:
> Similar to FIMD and Exynos5433's DECON, the Exynos7 DECON hardware:
> - May optionally require an IOMMU to initialize a display region.
> - Outputs image data to another block, say an MIC or a DSI master.
>
> If an IOMMU is present, it may also require to access the reserved
> framebuffer region.
>
> Document these bindings in the devicetree schema.
>
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> ---
> .../display/samsung/samsung,exynos7-decon.yaml | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support
2025-07-06 17:29 [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support Kaustabh Chakraborty
2025-07-06 17:29 ` [PATCH v4 1/2] dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports Kaustabh Chakraborty
2025-07-06 17:29 ` [PATCH v4 2/2] drm/exynos: exynos7_drm_decon: remove ctx->suspended Kaustabh Chakraborty
@ 2025-07-29 1:40 ` Inki Dae
2 siblings, 0 replies; 5+ messages in thread
From: Inki Dae @ 2025-07-29 1:40 UTC (permalink / raw)
To: Kaustabh Chakraborty
Cc: Seung-Woo Kim, Kyungmin Park, David Airlie, Simona Vetter,
Krzysztof Kozlowski, Alim Akhtar, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Rob Herring, Conor Dooley,
Ajay Kumar, Akshu Agrawal, Krzysztof Kozlowski, Conor Dooley,
dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel,
devicetree, stable
Hi Kaustabh Chakraborty,
This patch series has been merged into the exynos-drm-next branch.
Thanks,
Inki Dae
2025년 7월 7일 (월) 오전 2:30, Kaustabh Chakraborty <kauschluss@disroot.org>님이 작성:
>
> This patch series aims at adding support for Exynos7870's DECON in the
> Exynos7 DECON driver. It introduces a driver data struct so that support
> for DECON on other SoCs can be added to it in the future.
>
> It also fixes a few bugs in the driver, such as functions receiving bad
> pointers.
>
> Tested on Samsung Galaxy J7 Prime (samsung-on7xelte), Samsung Galaxy A2
> Core (samsung-a2corelte), and Samsung Galaxy J6 (samsung-j6lte).
>
> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
> ---
> Changes in v4:
> - Drop applied patch [v2 3/3].
> - Correct documentation of port dt property.
> - Add documentation of memory-region.
> - Remove redundant ctx->suspended completely.
> - Link to v3: https://lore.kernel.org/r/20250627-exynosdrm-decon-v3-0-5b456f88cfea@disroot.org
>
> Changes in v3:
> - Add a new commit documenting iommus and ports dt properties.
> - Link to v2: https://lore.kernel.org/r/20250612-exynosdrm-decon-v2-0-d6c1d21c8057@disroot.org
>
> Changes in v2:
> - Add a new commit to prevent an occasional panic under circumstances.
> - Rewrite and redo [v1 2/6] to be a more sensible commit.
> - Link to v1: https://lore.kernel.org/r/20240919-exynosdrm-decon-v1-0-6c5861c1cb04@disroot.org
>
> ---
> Kaustabh Chakraborty (2):
> dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports
> drm/exynos: exynos7_drm_decon: remove ctx->suspended
>
> .../display/samsung/samsung,exynos7-decon.yaml | 21 +++++++++++++
> drivers/gpu/drm/exynos/exynos7_drm_decon.c | 36 ----------------------
> 2 files changed, 21 insertions(+), 36 deletions(-)
> ---
> base-commit: 26ffb3d6f02cd0935fb9fa3db897767beee1cb2a
> change-id: 20240917-exynosdrm-decon-4c228dd1d2bf
>
> Best regards,
> --
> Kaustabh Chakraborty <kauschluss@disroot.org>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-29 1:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-06 17:29 [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support Kaustabh Chakraborty
2025-07-06 17:29 ` [PATCH v4 1/2] dt-bindings: display: samsung,exynos7-decon: document iommus, memory-region, and ports Kaustabh Chakraborty
2025-07-07 6:36 ` Krzysztof Kozlowski
2025-07-06 17:29 ` [PATCH v4 2/2] drm/exynos: exynos7_drm_decon: remove ctx->suspended Kaustabh Chakraborty
2025-07-29 1:40 ` [PATCH v4 0/2] Samsung Exynos 7870 DECON driver support Inki Dae
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).