mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Shayenne Moura <shayenneluzmoura@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/7] drm: Remove use of drm_mode_object
Date: Wed, 19 Dec 2018 14:11:19 +0100	[thread overview]
Message-ID: <20181219131119.GP21184@phenom.ffwll.local> (raw)
In-Reply-To: <20181218133810.aqhmqflvl5mqrfgo@smtp.gmail.com>

On Tue, Dec 18, 2018 at 11:38:10AM -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 <shayenneluzmoura@gmail.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/drm_crtc_helper.c | 5 ++---
>  drivers/gpu/drm/drm_modes.c       | 9 ---------
>  2 files changed, 2 insertions(+), 12 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..adce9a26bac9 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;
> -	}

With this we stop filing out base.id and base.type, so this patch should
be reordered in the series to be after all users of these fields are gone
from drivers. But before the last patch that removes these fields.

Thanks, Daniel

> -
>  	return nmode;
>  }
>  EXPORT_SYMBOL(drm_mode_create);
> @@ -92,8 +87,6 @@ void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode)
>  	if (!mode)
>  		return;
>  
> -	drm_mode_object_unregister(dev, &mode->base);
> -
>  	kfree(mode);
>  }
>  EXPORT_SYMBOL(drm_mode_destroy);
> @@ -911,11 +904,9 @@ EXPORT_SYMBOL(drm_mode_set_crtcinfo);
>   */
>  void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src)
>  {
> -	int id = dst->base.id;
>  	struct list_head head = dst->head;
>  
>  	*dst = *src;
> -	dst->base.id = id;
>  	dst->head = head;
>  }
>  EXPORT_SYMBOL(drm_mode_copy);
> -- 
> 2.17.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

      reply	other threads:[~2018-12-19 13:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 13:38 Shayenne Moura
2018-12-19 13:11 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181219131119.GP21184@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=sean@poorly.run \
    --cc=shayenneluzmoura@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®