[PATCH 3/3] modesetting: add tile property support (v2)

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 31 02:49:42 PDT 2015


On Tue, Mar 31, 2015 at 10:07:53AM +0100, Chris Wilson wrote:
> On Tue, Mar 31, 2015 at 01:47:26PM +1000, Dave Airlie wrote:
> > From: Dave Airlie <airlied at redhat.com>
> > 
> > This adds tiling support to the server modesetting driver,
> > it retrieves the tile info from the kernel and translates
> > it into the server format and exposes the property.
> > 
> > Signed-off-by: Dave Airlie <airlied at redhat.com>
> > ---
> 
> > +    if (drmmode_output->tile_blob) {
> > +        struct xf86CrtcTileInfo tile_info;
> > +
> > +        if (xf86OutputParseKMSTile(drmmode_output->tile_blob->data, drmmode_output->tile_blob->length, &tile_info) == TRUE)
> > +            xf86OutputSetTile(output, &tile_info);
> > +    }
> 
> How do we clear the previous tile?
> 
> 	struct xf86CrtcTileInfo tile_info;
> 
> 	memset(&tile_info, 0, sizeof(tile_info));
> 	if (drmmode_output->tile_blob)
> 		xf86OutputParseKMSTile(drmmode_output->tile_blob->data,
> 				       drmmode_output->tile_blob->length,
> 				       &tile_info);
> 	xf86OutputSetTile(output, &tile_info);

Or maybe:

	struct xf86CrtcTileInfo tile_info, *set = NULL;

 	if (drmmode_output->tile_blob &&
	    xf86OutputParseKMSTile(drmmode_output->tile_blob->data,
				   drmmode_output->tile_blob->length,
				   &tile_info))
	        set = &tile_info;

	xf86OutputSetTile(output, set);

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the xorg-devel mailing list