Lines Matching refs:plane

113 nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,  in nv10_update_plane()  argument
120 struct nouveau_drm *drm = nouveau_drm(plane->dev); in nv10_update_plane()
123 container_of(plane, struct nouveau_plane, base); in nv10_update_plane()
192 nv10_disable_plane(struct drm_plane *plane, in nv10_disable_plane() argument
195 struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object; in nv10_disable_plane()
197 container_of(plane, struct nouveau_plane, base); in nv10_disable_plane()
209 nv_destroy_plane(struct drm_plane *plane) in nv_destroy_plane() argument
211 drm_plane_force_disable(plane); in nv_destroy_plane()
212 drm_plane_cleanup(plane); in nv_destroy_plane()
213 kfree(plane); in nv_destroy_plane()
217 nv10_set_params(struct nouveau_plane *plane) in nv10_set_params() argument
219 struct nvif_object *dev = &nouveau_drm(plane->base.dev)->client.device.object; in nv10_set_params()
220 u32 luma = (plane->brightness - 512) << 16 | plane->contrast; in nv10_set_params()
221 u32 chroma = ((sin_mul(plane->hue, plane->saturation) & 0xffff) << 16) | in nv10_set_params()
222 (cos_mul(plane->hue, plane->saturation) & 0xffff); in nv10_set_params()
229 nvif_wr32(dev, NV_PVIDEO_COLOR_KEY, plane->colorkey & 0xffffff); in nv10_set_params()
231 if (plane->cur) { in nv10_set_params()
232 if (plane->color_encoding == DRM_COLOR_YCBCR_BT709) in nv10_set_params()
234 if (plane->colorkey & (1 << 24)) in nv10_set_params()
236 nvif_mask(dev, NV_PVIDEO_FORMAT(plane->flip), in nv10_set_params()
244 nv_set_property(struct drm_plane *plane, in nv_set_property() argument
249 container_of(plane, struct nouveau_plane, base); in nv_set_property()
282 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); in nv10_overlay_init() local
286 if (!plane) in nv10_overlay_init()
299 ret = drm_universal_plane_init(device, &plane->base, 3 /* both crtc's */, in nv10_overlay_init()
307 plane->props.colorkey = drm_property_create_range( in nv10_overlay_init()
309 plane->props.contrast = drm_property_create_range( in nv10_overlay_init()
311 plane->props.brightness = drm_property_create_range( in nv10_overlay_init()
313 plane->props.hue = drm_property_create_range( in nv10_overlay_init()
315 plane->props.saturation = drm_property_create_range( in nv10_overlay_init()
317 if (!plane->props.colorkey || in nv10_overlay_init()
318 !plane->props.contrast || in nv10_overlay_init()
319 !plane->props.brightness || in nv10_overlay_init()
320 !plane->props.hue || in nv10_overlay_init()
321 !plane->props.saturation) in nv10_overlay_init()
324 plane->colorkey = 0; in nv10_overlay_init()
325 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
326 plane->props.colorkey, plane->colorkey); in nv10_overlay_init()
328 plane->contrast = 0x1000; in nv10_overlay_init()
329 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
330 plane->props.contrast, plane->contrast); in nv10_overlay_init()
332 plane->brightness = 512; in nv10_overlay_init()
333 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
334 plane->props.brightness, plane->brightness); in nv10_overlay_init()
336 plane->hue = 0; in nv10_overlay_init()
337 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
338 plane->props.hue, plane->hue); in nv10_overlay_init()
340 plane->saturation = 0x1000; in nv10_overlay_init()
341 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
342 plane->props.saturation, plane->saturation); in nv10_overlay_init()
344 plane->color_encoding = DRM_COLOR_YCBCR_BT601; in nv10_overlay_init()
345 drm_plane_create_color_properties(&plane->base, in nv10_overlay_init()
352 plane->set_params = nv10_set_params; in nv10_overlay_init()
353 nv10_set_params(plane); in nv10_overlay_init()
354 drm_plane_force_disable(&plane->base); in nv10_overlay_init()
357 drm_plane_cleanup(&plane->base); in nv10_overlay_init()
359 kfree(plane); in nv10_overlay_init()
364 nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, in nv04_update_plane() argument
371 struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object; in nv04_update_plane()
373 container_of(plane, struct nouveau_plane, base); in nv04_update_plane()
443 nv04_disable_plane(struct drm_plane *plane, in nv04_disable_plane() argument
446 struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object; in nv04_disable_plane()
448 container_of(plane, struct nouveau_plane, base); in nv04_disable_plane()
473 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); in nv04_overlay_init() local
476 if (!plane) in nv04_overlay_init()
479 ret = drm_universal_plane_init(device, &plane->base, 1 /* single crtc */, in nv04_overlay_init()
486 plane->props.colorkey = drm_property_create_range( in nv04_overlay_init()
488 plane->props.brightness = drm_property_create_range( in nv04_overlay_init()
490 if (!plane->props.colorkey || in nv04_overlay_init()
491 !plane->props.brightness) in nv04_overlay_init()
494 plane->colorkey = 0; in nv04_overlay_init()
495 drm_object_attach_property(&plane->base.base, in nv04_overlay_init()
496 plane->props.colorkey, plane->colorkey); in nv04_overlay_init()
498 plane->brightness = 512; in nv04_overlay_init()
499 drm_object_attach_property(&plane->base.base, in nv04_overlay_init()
500 plane->props.brightness, plane->brightness); in nv04_overlay_init()
502 drm_plane_force_disable(&plane->base); in nv04_overlay_init()
505 drm_plane_cleanup(&plane->base); in nv04_overlay_init()
507 kfree(plane); in nv04_overlay_init()