Lines Matching refs:plane

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