Lines Matching refs:plane
93 nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, in nv10_update_plane() argument
99 struct nouveau_drm *drm = nouveau_drm(plane->dev); in nv10_update_plane()
102 container_of(plane, struct nouveau_plane, base); in nv10_update_plane()
175 nv10_disable_plane(struct drm_plane *plane) in nv10_disable_plane() argument
177 struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object; in nv10_disable_plane()
179 container_of(plane, struct nouveau_plane, base); in nv10_disable_plane()
191 nv_destroy_plane(struct drm_plane *plane) in nv_destroy_plane() argument
193 plane->funcs->disable_plane(plane); in nv_destroy_plane()
194 drm_plane_cleanup(plane); in nv_destroy_plane()
195 kfree(plane); in nv_destroy_plane()
199 nv10_set_params(struct nouveau_plane *plane) in nv10_set_params() argument
201 struct nvif_object *dev = &nouveau_drm(plane->base.dev)->device.object; in nv10_set_params()
202 u32 luma = (plane->brightness - 512) << 16 | plane->contrast; in nv10_set_params()
203 u32 chroma = ((sin_mul(plane->hue, plane->saturation) & 0xffff) << 16) | in nv10_set_params()
204 (cos_mul(plane->hue, plane->saturation) & 0xffff); in nv10_set_params()
211 nvif_wr32(dev, NV_PVIDEO_COLOR_KEY, plane->colorkey & 0xffffff); in nv10_set_params()
213 if (plane->cur) { in nv10_set_params()
214 if (plane->iturbt_709) in nv10_set_params()
216 if (plane->colorkey & (1 << 24)) in nv10_set_params()
218 nvif_mask(dev, NV_PVIDEO_FORMAT(plane->flip), in nv10_set_params()
226 nv_set_property(struct drm_plane *plane, in nv_set_property() argument
231 container_of(plane, struct nouveau_plane, base); in nv_set_property()
264 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); in nv10_overlay_init() local
268 if (!plane) in nv10_overlay_init()
281 ret = drm_plane_init(device, &plane->base, 3 /* both crtc's */, in nv10_overlay_init()
288 plane->props.colorkey = drm_property_create_range( in nv10_overlay_init()
290 plane->props.contrast = drm_property_create_range( in nv10_overlay_init()
292 plane->props.brightness = drm_property_create_range( in nv10_overlay_init()
294 plane->props.hue = drm_property_create_range( in nv10_overlay_init()
296 plane->props.saturation = drm_property_create_range( in nv10_overlay_init()
298 plane->props.iturbt_709 = drm_property_create_range( in nv10_overlay_init()
300 if (!plane->props.colorkey || in nv10_overlay_init()
301 !plane->props.contrast || in nv10_overlay_init()
302 !plane->props.brightness || in nv10_overlay_init()
303 !plane->props.hue || in nv10_overlay_init()
304 !plane->props.saturation || in nv10_overlay_init()
305 !plane->props.iturbt_709) in nv10_overlay_init()
308 plane->colorkey = 0; in nv10_overlay_init()
309 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
310 plane->props.colorkey, plane->colorkey); in nv10_overlay_init()
312 plane->contrast = 0x1000; in nv10_overlay_init()
313 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
314 plane->props.contrast, plane->contrast); in nv10_overlay_init()
316 plane->brightness = 512; in nv10_overlay_init()
317 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
318 plane->props.brightness, plane->brightness); in nv10_overlay_init()
320 plane->hue = 0; in nv10_overlay_init()
321 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
322 plane->props.hue, plane->hue); in nv10_overlay_init()
324 plane->saturation = 0x1000; in nv10_overlay_init()
325 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
326 plane->props.saturation, plane->saturation); in nv10_overlay_init()
328 plane->iturbt_709 = 0; in nv10_overlay_init()
329 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
330 plane->props.iturbt_709, plane->iturbt_709); in nv10_overlay_init()
332 plane->set_params = nv10_set_params; in nv10_overlay_init()
333 nv10_set_params(plane); in nv10_overlay_init()
334 nv10_disable_plane(&plane->base); in nv10_overlay_init()
337 drm_plane_cleanup(&plane->base); in nv10_overlay_init()
339 kfree(plane); in nv10_overlay_init()
344 nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, in nv04_update_plane() argument
350 struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object; in nv04_update_plane()
352 container_of(plane, struct nouveau_plane, base); in nv04_update_plane()
428 nv04_disable_plane(struct drm_plane *plane) in nv04_disable_plane() argument
430 struct nvif_object *dev = &nouveau_drm(plane->dev)->device.object; in nv04_disable_plane()
432 container_of(plane, struct nouveau_plane, base); in nv04_disable_plane()
457 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); in nv04_overlay_init() local
460 if (!plane) in nv04_overlay_init()
463 ret = drm_plane_init(device, &plane->base, 1 /* single crtc */, in nv04_overlay_init()
470 plane->props.colorkey = drm_property_create_range( in nv04_overlay_init()
472 plane->props.brightness = drm_property_create_range( in nv04_overlay_init()
474 if (!plane->props.colorkey || in nv04_overlay_init()
475 !plane->props.brightness) in nv04_overlay_init()
478 plane->colorkey = 0; in nv04_overlay_init()
479 drm_object_attach_property(&plane->base.base, in nv04_overlay_init()
480 plane->props.colorkey, plane->colorkey); in nv04_overlay_init()
482 plane->brightness = 512; in nv04_overlay_init()
483 drm_object_attach_property(&plane->base.base, in nv04_overlay_init()
484 plane->props.brightness, plane->brightness); in nv04_overlay_init()
486 nv04_disable_plane(&plane->base); in nv04_overlay_init()
489 drm_plane_cleanup(&plane->base); in nv04_overlay_init()
491 kfree(plane); in nv04_overlay_init()