Re: [RFC] drm: Helper macro for drm state duplication

2017-02-09 Thread Daniel Vetter
On Thu, Feb 09, 2017 at 03:41:41PM +, Mihail Atanassov wrote: > Hi, > > I was working on a few patches adding fields to struct malidp_crtc_state and > found myself writing memcpy multiple times in the ->atomic_duplicate_state > hook because I wanted to avoid copying the drm_crtc_state twice >

Re: [RFC] drm: Helper macro for drm state duplication

2017-02-09 Thread Liviu Dudau
On Thu, Feb 09, 2017 at 05:57:04PM +0100, Daniel Vetter wrote: > On Thu, Feb 09, 2017 at 03:41:41PM +, Mihail Atanassov wrote: > > Hi, > > > > I was working on a few patches adding fields to struct malidp_crtc_state and > > found myself writing memcpy multiple times in the ->atomic_duplicate_s

[RFC] drm: Helper macro for drm state duplication

2017-02-09 Thread Mihail Atanassov
Hi, I was working on a few patches adding fields to struct malidp_crtc_state and found myself writing memcpy multiple times in the ->atomic_duplicate_state hook because I wanted to avoid copying the drm_crtc_state twice (__drm_atomic_helper_crtc_duplicate_state copies it already). I figured this a