Lines Matching refs:plane

93 nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,  in nv10_update_plane()  argument
99 struct nvif_device *dev = &nouveau_drm(plane->dev)->device; in nv10_update_plane()
101 container_of(plane, struct nouveau_plane, base); in nv10_update_plane()
174 nv10_disable_plane(struct drm_plane *plane) in nv10_disable_plane() argument
176 struct nvif_device *dev = &nouveau_drm(plane->dev)->device; in nv10_disable_plane()
178 container_of(plane, struct nouveau_plane, base); in nv10_disable_plane()
190 nv_destroy_plane(struct drm_plane *plane) in nv_destroy_plane() argument
192 plane->funcs->disable_plane(plane); in nv_destroy_plane()
193 drm_plane_cleanup(plane); in nv_destroy_plane()
194 kfree(plane); in nv_destroy_plane()
198 nv10_set_params(struct nouveau_plane *plane) in nv10_set_params() argument
200 struct nvif_device *dev = &nouveau_drm(plane->base.dev)->device; in nv10_set_params()
201 u32 luma = (plane->brightness - 512) << 16 | plane->contrast; in nv10_set_params()
202 u32 chroma = ((sin_mul(plane->hue, plane->saturation) & 0xffff) << 16) | in nv10_set_params()
203 (cos_mul(plane->hue, plane->saturation) & 0xffff); in nv10_set_params()
210 nvif_wr32(dev, NV_PVIDEO_COLOR_KEY, plane->colorkey & 0xffffff); in nv10_set_params()
212 if (plane->cur) { in nv10_set_params()
213 if (plane->iturbt_709) in nv10_set_params()
215 if (plane->colorkey & (1 << 24)) in nv10_set_params()
217 nvif_mask(dev, NV_PVIDEO_FORMAT(plane->flip), in nv10_set_params()
225 nv_set_property(struct drm_plane *plane, in nv_set_property() argument
230 container_of(plane, struct nouveau_plane, base); in nv_set_property()
263 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); in nv10_overlay_init() local
267 if (!plane) in nv10_overlay_init()
280 ret = drm_plane_init(device, &plane->base, 3 /* both crtc's */, in nv10_overlay_init()
287 plane->props.colorkey = drm_property_create_range( in nv10_overlay_init()
289 plane->props.contrast = drm_property_create_range( in nv10_overlay_init()
291 plane->props.brightness = drm_property_create_range( in nv10_overlay_init()
293 plane->props.hue = drm_property_create_range( in nv10_overlay_init()
295 plane->props.saturation = drm_property_create_range( in nv10_overlay_init()
297 plane->props.iturbt_709 = drm_property_create_range( in nv10_overlay_init()
299 if (!plane->props.colorkey || in nv10_overlay_init()
300 !plane->props.contrast || in nv10_overlay_init()
301 !plane->props.brightness || in nv10_overlay_init()
302 !plane->props.hue || in nv10_overlay_init()
303 !plane->props.saturation || in nv10_overlay_init()
304 !plane->props.iturbt_709) in nv10_overlay_init()
307 plane->colorkey = 0; in nv10_overlay_init()
308 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
309 plane->props.colorkey, plane->colorkey); in nv10_overlay_init()
311 plane->contrast = 0x1000; in nv10_overlay_init()
312 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
313 plane->props.contrast, plane->contrast); in nv10_overlay_init()
315 plane->brightness = 512; in nv10_overlay_init()
316 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
317 plane->props.brightness, plane->brightness); in nv10_overlay_init()
319 plane->hue = 0; in nv10_overlay_init()
320 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
321 plane->props.hue, plane->hue); in nv10_overlay_init()
323 plane->saturation = 0x1000; in nv10_overlay_init()
324 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
325 plane->props.saturation, plane->saturation); in nv10_overlay_init()
327 plane->iturbt_709 = 0; in nv10_overlay_init()
328 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
329 plane->props.iturbt_709, plane->iturbt_709); in nv10_overlay_init()
331 plane->set_params = nv10_set_params; in nv10_overlay_init()
332 nv10_set_params(plane); in nv10_overlay_init()
333 nv10_disable_plane(&plane->base); in nv10_overlay_init()
336 drm_plane_cleanup(&plane->base); in nv10_overlay_init()
338 kfree(plane); in nv10_overlay_init()
343 nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, in nv04_update_plane() argument
349 struct nvif_device *dev = &nouveau_drm(plane->dev)->device; in nv04_update_plane()
351 container_of(plane, struct nouveau_plane, base); in nv04_update_plane()
427 nv04_disable_plane(struct drm_plane *plane) in nv04_disable_plane() argument
429 struct nvif_device *dev = &nouveau_drm(plane->dev)->device; in nv04_disable_plane()
431 container_of(plane, struct nouveau_plane, base); in nv04_disable_plane()
456 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); in nv04_overlay_init() local
459 if (!plane) in nv04_overlay_init()
462 ret = drm_plane_init(device, &plane->base, 1 /* single crtc */, in nv04_overlay_init()
469 plane->props.colorkey = drm_property_create_range( in nv04_overlay_init()
471 plane->props.brightness = drm_property_create_range( in nv04_overlay_init()
473 if (!plane->props.colorkey || in nv04_overlay_init()
474 !plane->props.brightness) in nv04_overlay_init()
477 plane->colorkey = 0; in nv04_overlay_init()
478 drm_object_attach_property(&plane->base.base, in nv04_overlay_init()
479 plane->props.colorkey, plane->colorkey); in nv04_overlay_init()
481 plane->brightness = 512; in nv04_overlay_init()
482 drm_object_attach_property(&plane->base.base, in nv04_overlay_init()
483 plane->props.brightness, plane->brightness); in nv04_overlay_init()
485 nv04_disable_plane(&plane->base); in nv04_overlay_init()
488 drm_plane_cleanup(&plane->base); in nv04_overlay_init()
490 kfree(plane); in nv04_overlay_init()