diff mbox

[08/23] drm: omapdrm: crtc: add enabled bit to state

Message ID 1457455195-1938-9-git-send-email-sre@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Reichel March 8, 2016, 4:39 p.m. UTC
Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Laurent Pinchart March 26, 2016, 4:35 p.m. UTC | #1
Hi Sebastian,

Thank you for the patch.

Given that you only add four lines of code here, and given that the enabled 
bit is unused here, I'd just squash this patch with the one that makes use of 
the enabled bit.

On Tuesday 08 Mar 2016 17:39:40 Sebastian Reichel wrote:
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
>  drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c
> b/drivers/gpu/drm/omapdrm/omap_crtc.c index 5ef27664bcfa..78ef9773cca1
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -207,6 +207,8 @@ static int omap_crtc_dss_enable(struct
> omap_overlay_manager *mgr) &omap_crtc->timings);
>  	omap_crtc_set_enabled(&omap_crtc->base, true);
> 
> +	set_bit(crtc_enabled, &omap_crtc->state);
> +

Atomic KMS drivers should store state in the state structure, not the KMS 
objects themselves. Beside, how does this differ from the CRTC state enable 
and active fields ?

>  	return 0;
>  }
> 
> @@ -214,6 +216,8 @@ static void omap_crtc_dss_disable(struct
> omap_overlay_manager *mgr) {
>  	struct omap_crtc *omap_crtc = omap_crtcs[mgr->id];
> 
> +	clear_bit(crtc_enabled, &omap_crtc->state);
> +
>  	omap_crtc_set_enabled(&omap_crtc->base, false);
>  }
diff mbox

Patch

diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 5ef27664bcfa..78ef9773cca1 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -207,6 +207,8 @@  static int omap_crtc_dss_enable(struct omap_overlay_manager *mgr)
 			&omap_crtc->timings);
 	omap_crtc_set_enabled(&omap_crtc->base, true);
 
+	set_bit(crtc_enabled, &omap_crtc->state);
+
 	return 0;
 }
 
@@ -214,6 +216,8 @@  static void omap_crtc_dss_disable(struct omap_overlay_manager *mgr)
 {
 	struct omap_crtc *omap_crtc = omap_crtcs[mgr->id];
 
+	clear_bit(crtc_enabled, &omap_crtc->state);
+
 	omap_crtc_set_enabled(&omap_crtc->base, false);
 }