diff mbox

[08/16] drm/atmel-hlcdec: Use for_each_new_connector_in_state

Message ID 20170712081344.25495-9-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maarten Lankhorst July 12, 2017, 8:13 a.m. UTC
for_each_obj_in_state is about to be removed, so use the new iterator
macros.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter July 12, 2017, 9:17 a.m. UTC | #1
On Wed, Jul 12, 2017 at 10:13:36AM +0200, Maarten Lankhorst wrote:
> for_each_obj_in_state is about to be removed, so use the new iterator
> macros.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> index 441769c5bcd4..4fbbeab5c5d4 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> @@ -237,7 +237,7 @@ static int atmel_hlcdc_crtc_select_output_mode(struct drm_crtc_state *state)
>  
>  	crtc = drm_crtc_to_atmel_hlcdc_crtc(state->crtc);
>  
> -	for_each_connector_in_state(state->state, connector, cstate, i) {
> +	for_each_new_connector_in_state(state->state, connector, cstate, i) {

The code herein looks like the perfect thing to stuff into
encoder->atomic_check, since that can fill out the crtc state too. But
this works too.

Patch itself looks good.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

>  		struct drm_display_info *info = &connector->display_info;
>  		unsigned int supported_fmts = 0;
>  		int j;
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Boris BREZILLON July 12, 2017, 9:22 a.m. UTC | #2
On Wed, 12 Jul 2017 10:13:36 +0200
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:

> for_each_obj_in_state is about to be removed, so use the new iterator
> macros.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> index 441769c5bcd4..4fbbeab5c5d4 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> @@ -237,7 +237,7 @@ static int atmel_hlcdc_crtc_select_output_mode(struct drm_crtc_state *state)
>  
>  	crtc = drm_crtc_to_atmel_hlcdc_crtc(state->crtc);
>  
> -	for_each_connector_in_state(state->state, connector, cstate, i) {
> +	for_each_new_connector_in_state(state->state, connector, cstate, i) {
>  		struct drm_display_info *info = &connector->display_info;
>  		unsigned int supported_fmts = 0;
>  		int j;
diff mbox

Patch

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
index 441769c5bcd4..4fbbeab5c5d4 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
@@ -237,7 +237,7 @@  static int atmel_hlcdc_crtc_select_output_mode(struct drm_crtc_state *state)
 
 	crtc = drm_crtc_to_atmel_hlcdc_crtc(state->crtc);
 
-	for_each_connector_in_state(state->state, connector, cstate, i) {
+	for_each_new_connector_in_state(state->state, connector, cstate, i) {
 		struct drm_display_info *info = &connector->display_info;
 		unsigned int supported_fmts = 0;
 		int j;