Re: [RFCv4 10/14] drm: convert crtc to properties/state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 25, 2013 at 09:47:34AM -0500, Rob Clark wrote:
...
> +static struct drm_crtc_state *
> +drm_atomic_helper_get_crtc_state(struct drm_crtc *crtc, void *state)
> +{
> +	struct drm_atomic_helper_state *a = state;
> +	struct drm_crtc_state *cstate;
> +	int ret;
> +
> +	ret = drm_modeset_lock(&crtc->mutex, state);
> +	if (ret)
> +		return ERR_PTR(ret);
> +
> +	cstate = a->cstates[crtc->id];

The id field of struct drm_crtc never seems to be initialized in the
current DRM codebase, so this will always wind up looking up cstates[0];
we probably want to initialize crtc->id in drm_crtc_init() at the same
place we increment dev->mode_config.num_crtc.

...
> +static int check_connectors(struct drm_crtc *crtc, void *state, bool fix,
> +		uint32_t *connector_ids, uint32_t num_connector_ids)
> +{
> +	struct drm_mode_config *config = &crtc->dev->mode_config;
> +	struct drm_crtc *ocrtc; /* other connector */
> +
> +	list_for_each_entry(ocrtc, &config->crtc_list, head) {
> +		struct drm_crtc_state *ostate; /* other state */
> +		unsigned i;
> +
> +		if (ocrtc == crtc)
> +			continue;
> +
> +		ostate = drm_atomic_get_crtc_state(crtc, state);

I think you meant to use ocrtc here rather than crtc, right?


I think you might also want to move patch 11 up above 9 & 10, otherwise
you'll run into the lastclose deadlock while bisecting through this
patchset.


Matt

-- 
Matt Roper
Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux