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()
191 nv10_disable_plane(struct drm_plane *plane, in nv10_disable_plane() argument
194 struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object; in nv10_disable_plane()
196 container_of(plane, struct nouveau_plane, base); in nv10_disable_plane()
208 nv_destroy_plane(struct drm_plane *plane) in nv_destroy_plane() argument
210 drm_plane_force_disable(plane); in nv_destroy_plane()
211 drm_plane_cleanup(plane); in nv_destroy_plane()
212 kfree(plane); in nv_destroy_plane()
216 nv10_set_params(struct nouveau_plane *plane) in nv10_set_params() argument
218 struct nvif_object *dev = &nouveau_drm(plane->base.dev)->client.device.object; in nv10_set_params()
219 u32 luma = (plane->brightness - 512) << 16 | plane->contrast; in nv10_set_params()
220 u32 chroma = ((sin_mul(plane->hue, plane->saturation) & 0xffff) << 16) | in nv10_set_params()
221 (cos_mul(plane->hue, plane->saturation) & 0xffff); in nv10_set_params()
228 nvif_wr32(dev, NV_PVIDEO_COLOR_KEY, plane->colorkey & 0xffffff); in nv10_set_params()
230 if (plane->cur) { in nv10_set_params()
231 if (plane->color_encoding == DRM_COLOR_YCBCR_BT709) in nv10_set_params()
233 if (plane->colorkey & (1 << 24)) in nv10_set_params()
235 nvif_mask(dev, NV_PVIDEO_FORMAT(plane->flip), in nv10_set_params()
243 nv_set_property(struct drm_plane *plane, in nv_set_property() argument
248 container_of(plane, struct nouveau_plane, base); in nv_set_property()
281 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); in nv10_overlay_init() local
285 if (!plane) in nv10_overlay_init()
298 ret = drm_plane_init(device, &plane->base, 3 /* both crtc's */, in nv10_overlay_init()
305 plane->props.colorkey = drm_property_create_range( in nv10_overlay_init()
307 plane->props.contrast = drm_property_create_range( in nv10_overlay_init()
309 plane->props.brightness = drm_property_create_range( in nv10_overlay_init()
311 plane->props.hue = drm_property_create_range( in nv10_overlay_init()
313 plane->props.saturation = drm_property_create_range( in nv10_overlay_init()
315 if (!plane->props.colorkey || in nv10_overlay_init()
316 !plane->props.contrast || in nv10_overlay_init()
317 !plane->props.brightness || in nv10_overlay_init()
318 !plane->props.hue || in nv10_overlay_init()
319 !plane->props.saturation) in nv10_overlay_init()
322 plane->colorkey = 0; in nv10_overlay_init()
323 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
324 plane->props.colorkey, plane->colorkey); in nv10_overlay_init()
326 plane->contrast = 0x1000; in nv10_overlay_init()
327 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
328 plane->props.contrast, plane->contrast); in nv10_overlay_init()
330 plane->brightness = 512; in nv10_overlay_init()
331 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
332 plane->props.brightness, plane->brightness); in nv10_overlay_init()
334 plane->hue = 0; in nv10_overlay_init()
335 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
336 plane->props.hue, plane->hue); in nv10_overlay_init()
338 plane->saturation = 0x1000; in nv10_overlay_init()
339 drm_object_attach_property(&plane->base.base, in nv10_overlay_init()
340 plane->props.saturation, plane->saturation); in nv10_overlay_init()
342 plane->color_encoding = DRM_COLOR_YCBCR_BT601; in nv10_overlay_init()
343 drm_plane_create_color_properties(&plane->base, in nv10_overlay_init()
350 plane->set_params = nv10_set_params; in nv10_overlay_init()
351 nv10_set_params(plane); in nv10_overlay_init()
352 drm_plane_force_disable(&plane->base); in nv10_overlay_init()
355 drm_plane_cleanup(&plane->base); in nv10_overlay_init()
357 kfree(plane); in nv10_overlay_init()
362 nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, in nv04_update_plane() argument
369 struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object; in nv04_update_plane()
371 container_of(plane, struct nouveau_plane, base); in nv04_update_plane()
440 nv04_disable_plane(struct drm_plane *plane, in nv04_disable_plane() argument
443 struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object; in nv04_disable_plane()
445 container_of(plane, struct nouveau_plane, base); in nv04_disable_plane()
470 struct nouveau_plane *plane = kzalloc(sizeof(struct nouveau_plane), GFP_KERNEL); in nv04_overlay_init() local
473 if (!plane) in nv04_overlay_init()
476 ret = drm_plane_init(device, &plane->base, 1 /* single crtc */, in nv04_overlay_init()
483 plane->props.colorkey = drm_property_create_range( in nv04_overlay_init()
485 plane->props.brightness = drm_property_create_range( in nv04_overlay_init()
487 if (!plane->props.colorkey || in nv04_overlay_init()
488 !plane->props.brightness) in nv04_overlay_init()
491 plane->colorkey = 0; in nv04_overlay_init()
492 drm_object_attach_property(&plane->base.base, in nv04_overlay_init()
493 plane->props.colorkey, plane->colorkey); in nv04_overlay_init()
495 plane->brightness = 512; in nv04_overlay_init()
496 drm_object_attach_property(&plane->base.base, in nv04_overlay_init()
497 plane->props.brightness, plane->brightness); in nv04_overlay_init()
499 drm_plane_force_disable(&plane->base); in nv04_overlay_init()
502 drm_plane_cleanup(&plane->base); in nv04_overlay_init()
504 kfree(plane); in nv04_overlay_init()