[PATCH v2 12/14] drm/ast: Replace struct ast_crtc with struct drm_crtc

Sam Ravnborg sam at ravnborg.org
Fri Jul 3 11:11:08 UTC 2020


Hi Thomas.

On Fri, Jul 03, 2020 at 08:51:31AM +0200, Thomas Zimmermann wrote:
> Hi Sam
> 
> Am 03.07.20 um 08:38 schrieb Sam Ravnborg:
> > Hi Thomas.
> > 
> > Just browsing code..
> > 
> > On Thu, Jul 02, 2020 at 01:50:27PM +0200, Thomas Zimmermann wrote:
> >> Struct ast_crtc has been cleaned up and it's now a wrapper around the
> >> DRM CRTC structure struct drm_crtc. This patch converts the driver to
> >> struct drm_crtc and removes struct ast_crtc.
> >>
> >> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> > 
> > Why is it we cannot embed struct drm_crtc?
> 
> I want to do that in a later patchset. The conversion to managed code is
> fairly large, so thought it might be better to do it in several rounds.

Understood, and several rounds are good.

> 
> This patchset is only for modesetting. I have another patchset that
> converts the memory management to managed interfaces. After that the
> final patchset will address device structures. Embedding everything CRTC
> and other structures in struct ast_private would be part of this.
> 
> If you prefer a longer patchset that does everything, let me know.
> 
> > And I also failed to see where is is de-allocated - but surely I miss
> > something obvious here.
> 
> It's freed in ast_crtc_destroy().

Ohh, one of the places that worked/works because struct crtc was/is the
first member.

I get it now, thanks for the explanation.

	Sam


More information about the dri-devel mailing list