Re: [PATCH 6/7] drm: Remove use of drm_mode_object

2018-12-19 Thread Daniel Vetter
On Wed, Dec 19, 2018 at 07:28:36PM -0200, Shayenne Moura wrote:
> This patch removes the drm_mode_object prints, evaluation and use from
> drm_display_mode objects used in drm files. It removes dependency from
> drm_mode_object.
> 
> Signed-off-by: Shayenne Moura 
> ---
>  drivers/gpu/drm/drm_crtc_helper.c | 5 ++---
>  drivers/gpu/drm/drm_modes.c   | 5 -
>  2 files changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c 
> b/drivers/gpu/drm/drm_crtc_helper.c
> index a3c81850e755..cc5cc8d109a2 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> @@ -386,9 +386,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
>   if (!encoder_funcs)
>   continue;
>  
> - DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%d:%s]\n",
> - encoder->base.id, encoder->name,
> - mode->base.id, mode->name);
> + DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%s]\n",
> + encoder->base.id, encoder->name, mode->name);
>   if (encoder_funcs->mode_set)
>   encoder_funcs->mode_set(encoder, mode, adjusted_mode);
>  
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 24a750436559..e2689afdcf50 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -71,11 +71,6 @@ struct drm_display_mode *drm_mode_create(struct drm_device 
> *dev)
>   if (!nmode)
>   return NULL;
>  
> - if (drm_mode_object_add(dev, &nmode->base, DRM_MODE_OBJECT_MODE)) {
> - kfree(nmode);
> - return NULL;
> - }

You seem to have lost the 3rd hunk here compared to the previous version.

For reordering patches the best way is to use 

$ git rebase --interactive

which fires up a text editor where you can reorder the patches as you see
fit. That way you don't have to touch them and risk breaking something.

Another thing: When resending patches unchanged, and your previous version
has received r-b/a-b tags, please include them. That way people know what
still needs to be reviewed and what is already reviewed. I think there was
also some other patches than this one that I reviewed already, can you pls
redo the patch series with r-b tags included, patch commit log (where you
did change something) added and then resend?

Threading looks good now.

Thanks, Daniel

> -
>   return nmode;
>  }
>  EXPORT_SYMBOL(drm_mode_create);
> -- 
> 2.17.1
> 
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


[PATCH 6/7] drm: Remove use of drm_mode_object

2018-12-19 Thread Shayenne Moura
This patch removes the drm_mode_object prints, evaluation and use from
drm_display_mode objects used in drm files. It removes dependency from
drm_mode_object.

Signed-off-by: Shayenne Moura 
---
 drivers/gpu/drm/drm_crtc_helper.c | 5 ++---
 drivers/gpu/drm/drm_modes.c   | 5 -
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c 
b/drivers/gpu/drm/drm_crtc_helper.c
index a3c81850e755..cc5cc8d109a2 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -386,9 +386,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
if (!encoder_funcs)
continue;
 
-   DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%d:%s]\n",
-   encoder->base.id, encoder->name,
-   mode->base.id, mode->name);
+   DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%s]\n",
+   encoder->base.id, encoder->name, mode->name);
if (encoder_funcs->mode_set)
encoder_funcs->mode_set(encoder, mode, adjusted_mode);
 
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 24a750436559..e2689afdcf50 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -71,11 +71,6 @@ struct drm_display_mode *drm_mode_create(struct drm_device 
*dev)
if (!nmode)
return NULL;
 
-   if (drm_mode_object_add(dev, &nmode->base, DRM_MODE_OBJECT_MODE)) {
-   kfree(nmode);
-   return NULL;
-   }
-
return nmode;
 }
 EXPORT_SYMBOL(drm_mode_create);
-- 
2.17.1