[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Ville Syrjälä
On Mon, May 26, 2014 at 05:37:57PM +0200, Daniel Vetter wrote: > On Mon, May 26, 2014 at 06:23:05PM +0300, Ville Syrj?l? wrote: > > On Mon, May 26, 2014 at 11:31:10AM +0200, Daniel Vetter wrote: > > > On Sat, May 24, 2014 at 02:30:21PM -0400, Rob Clark wrote: > > > > @@ -92,7 +100,18 @@ int drm_ato

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Ville Syrjälä
On Mon, May 26, 2014 at 11:31:10AM +0200, Daniel Vetter wrote: > On Sat, May 24, 2014 at 02:30:21PM -0400, Rob Clark wrote: > > Break the mutable state of a crtc out into a separate structure > > and use atomic properties mechanism to set crtc attributes. This > > makes it easier to have some help

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Daniel Vetter
On Mon, May 26, 2014 at 06:46:30PM +0300, Ville Syrj?l? wrote: > On Mon, May 26, 2014 at 05:37:57PM +0200, Daniel Vetter wrote: > > On Mon, May 26, 2014 at 06:23:05PM +0300, Ville Syrj?l? wrote: > > > On Mon, May 26, 2014 at 11:31:10AM +0200, Daniel Vetter wrote: > > > > On Sat, May 24, 2014 at 02:

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Daniel Vetter
On Mon, May 26, 2014 at 06:23:05PM +0300, Ville Syrj?l? wrote: > On Mon, May 26, 2014 at 11:31:10AM +0200, Daniel Vetter wrote: > > On Sat, May 24, 2014 at 02:30:21PM -0400, Rob Clark wrote: > > > @@ -92,7 +100,18 @@ int drm_atomic_set_event(struct drm_device *dev, > > > struct drm_atomic

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Daniel Vetter
On Mon, May 26, 2014 at 07:35:45AM -0400, Rob Clark wrote: > On Mon, May 26, 2014 at 5:31 AM, Daniel Vetter wrote: > >> +struct drm_crtc_state * > >> +drm_atomic_get_crtc_state(struct drm_crtc *crtc, struct drm_atomic_state > >> *a) > >> +{ > >> + struct drm_crtc_state *cstate; > >> + int

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Rob Clark
On Mon, May 26, 2014 at 11:37 AM, Daniel Vetter wrote: > On Mon, May 26, 2014 at 06:23:05PM +0300, Ville Syrj?l? wrote: >> On Mon, May 26, 2014 at 11:31:10AM +0200, Daniel Vetter wrote: >> > On Sat, May 24, 2014 at 02:30:21PM -0400, Rob Clark wrote: >> > > @@ -92,7 +100,18 @@ int drm_atomic_set_ev

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Daniel Vetter
On Sat, May 24, 2014 at 02:30:21PM -0400, Rob Clark wrote: > Break the mutable state of a crtc out into a separate structure > and use atomic properties mechanism to set crtc attributes. This > makes it easier to have some helpers for crtc->set_property() > and for checking for invalid params. Th

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Rob Clark
On Mon, May 26, 2014 at 10:56 AM, Daniel Vetter wrote: > On Mon, May 26, 2014 at 07:35:45AM -0400, Rob Clark wrote: >> On Mon, May 26, 2014 at 5:31 AM, Daniel Vetter wrote: >> >> +struct drm_crtc_state * >> >> +drm_atomic_get_crtc_state(struct drm_crtc *crtc, struct drm_atomic_state >> >> *a) >>

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-26 Thread Rob Clark
On Mon, May 26, 2014 at 5:31 AM, Daniel Vetter wrote: >> +struct drm_crtc_state * >> +drm_atomic_get_crtc_state(struct drm_crtc *crtc, struct drm_atomic_state *a) >> +{ >> + struct drm_crtc_state *cstate; >> + int ret; >> + >> + cstate = a->cstates[crtc->id]; >> + >> + if (!cstate)

[PATCH 12/17] drm: convert crtc to properties/state

2014-05-24 Thread Rob Clark
Break the mutable state of a crtc out into a separate structure and use atomic properties mechanism to set crtc attributes. This makes it easier to have some helpers for crtc->set_property() and for checking for invalid params. The idea is that individual drivers can wrap the state struct in thei