Lines Matching +full:pre +full:- +full:scaling
43 * sub-pixel accuracy, which is scaled up to a pixel-aligned destination
88 * filtering than just a bilinear one when scaling. The filtering mode when
89 * scaling is unspecified.
96 * plane-wide opacity, from transparent (0) to opaque (0xffff). It can be
99 * pre-multiplied by the global alpha associated to the plane.
109 * "rotate-<degrees>":
113 * "reflect-<axis>":
117 * reflect-x::
120 * | | -> | |
123 * reflect-y::
126 * | | -> | |
137 * value can also be immutable, to inform userspace about the hard-coded
154 * (1 - plane_alpha) * bg.rgb
156 * "Pre-multiplied":
158 * have been already pre-multiplied with the alpha
162 * (1 - (plane_alpha * fg.alpha)) * bg.rgb
166 * been pre-multiplied and will do so when blending them to the
170 * (1 - (plane_alpha * fg.alpha)) * bg.rgb
200 * drm_plane_create_alpha_property - create a new alpha property
216 prop = drm_property_create_range(plane->dev, 0, "alpha", in drm_plane_create_alpha_property()
219 return -ENOMEM; in drm_plane_create_alpha_property()
221 drm_object_attach_property(&plane->base, prop, DRM_BLEND_ALPHA_OPAQUE); in drm_plane_create_alpha_property()
222 plane->alpha_property = prop; in drm_plane_create_alpha_property()
224 if (plane->state) in drm_plane_create_alpha_property()
225 plane->state->alpha = DRM_BLEND_ALPHA_OPAQUE; in drm_plane_create_alpha_property()
232 * drm_plane_create_rotation_property - create a new rotation property
248 * "rotate-0"
250 * "rotate-90"
252 * "rotate-180"
254 * "rotate-270"
256 * "reflect-x"
258 * "reflect-y"
263 * the source rectangle, before scaling it to fit the destination rectangle.
270 { __builtin_ffs(DRM_MODE_ROTATE_0) - 1, "rotate-0" }, in drm_plane_create_rotation_property()
271 { __builtin_ffs(DRM_MODE_ROTATE_90) - 1, "rotate-90" }, in drm_plane_create_rotation_property()
272 { __builtin_ffs(DRM_MODE_ROTATE_180) - 1, "rotate-180" }, in drm_plane_create_rotation_property()
273 { __builtin_ffs(DRM_MODE_ROTATE_270) - 1, "rotate-270" }, in drm_plane_create_rotation_property()
274 { __builtin_ffs(DRM_MODE_REFLECT_X) - 1, "reflect-x" }, in drm_plane_create_rotation_property()
275 { __builtin_ffs(DRM_MODE_REFLECT_Y) - 1, "reflect-y" }, in drm_plane_create_rotation_property()
283 prop = drm_property_create_bitmask(plane->dev, 0, "rotation", in drm_plane_create_rotation_property()
287 return -ENOMEM; in drm_plane_create_rotation_property()
289 drm_object_attach_property(&plane->base, prop, rotation); in drm_plane_create_rotation_property()
291 if (plane->state) in drm_plane_create_rotation_property()
292 plane->state->rotation = rotation; in drm_plane_create_rotation_property()
294 plane->rotation_property = prop; in drm_plane_create_rotation_property()
301 * drm_rotation_simplify() - Try to simplify the rotation
333 * drm_plane_create_zpos_property - create mutable zpos property
346 * should be set to 0 and max to maximal number of planes for given crtc - 1.
368 prop = drm_property_create_range(plane->dev, 0, "zpos", min, max); in drm_plane_create_zpos_property()
370 return -ENOMEM; in drm_plane_create_zpos_property()
372 drm_object_attach_property(&plane->base, prop, zpos); in drm_plane_create_zpos_property()
374 plane->zpos_property = prop; in drm_plane_create_zpos_property()
376 if (plane->state) { in drm_plane_create_zpos_property()
377 plane->state->zpos = zpos; in drm_plane_create_zpos_property()
378 plane->state->normalized_zpos = zpos; in drm_plane_create_zpos_property()
386 * drm_plane_create_zpos_immutable_property - create immuttable zpos property
406 prop = drm_property_create_range(plane->dev, DRM_MODE_PROP_IMMUTABLE, in drm_plane_create_zpos_immutable_property()
409 return -ENOMEM; in drm_plane_create_zpos_immutable_property()
411 drm_object_attach_property(&plane->base, prop, zpos); in drm_plane_create_zpos_immutable_property()
413 plane->zpos_property = prop; in drm_plane_create_zpos_immutable_property()
415 if (plane->state) { in drm_plane_create_zpos_immutable_property()
416 plane->state->zpos = zpos; in drm_plane_create_zpos_immutable_property()
417 plane->state->normalized_zpos = zpos; in drm_plane_create_zpos_immutable_property()
429 if (sa->zpos != sb->zpos) in drm_atomic_state_zpos_cmp()
430 return sa->zpos - sb->zpos; in drm_atomic_state_zpos_cmp()
432 return sa->plane->base.id - sb->plane->base.id; in drm_atomic_state_zpos_cmp()
438 struct drm_atomic_state *state = crtc_state->state; in drm_atomic_helper_crtc_normalize_zpos()
439 struct drm_device *dev = crtc->dev; in drm_atomic_helper_crtc_normalize_zpos()
440 int total_planes = dev->mode_config.num_total_plane; in drm_atomic_helper_crtc_normalize_zpos()
447 crtc->base.id, crtc->name); in drm_atomic_helper_crtc_normalize_zpos()
451 return -ENOMEM; in drm_atomic_helper_crtc_normalize_zpos()
457 drm_for_each_plane_mask(plane, dev, crtc_state->plane_mask) { in drm_atomic_helper_crtc_normalize_zpos()
466 plane->base.id, plane->name, in drm_atomic_helper_crtc_normalize_zpos()
467 plane_state->zpos); in drm_atomic_helper_crtc_normalize_zpos()
473 plane = states[i]->plane; in drm_atomic_helper_crtc_normalize_zpos()
475 states[i]->normalized_zpos = i; in drm_atomic_helper_crtc_normalize_zpos()
477 plane->base.id, plane->name, i); in drm_atomic_helper_crtc_normalize_zpos()
479 crtc_state->zpos_changed = true; in drm_atomic_helper_crtc_normalize_zpos()
487 * drm_atomic_normalize_zpos - calculate normalized zpos values for all crtcs
502 * Zero for success or -errno
514 crtc = new_plane_state->crtc; in drm_atomic_normalize_zpos()
517 if (old_plane_state->zpos != new_plane_state->zpos) { in drm_atomic_normalize_zpos()
519 new_crtc_state->zpos_changed = true; in drm_atomic_normalize_zpos()
524 if (old_crtc_state->plane_mask != new_crtc_state->plane_mask || in drm_atomic_normalize_zpos()
525 new_crtc_state->zpos_changed) { in drm_atomic_normalize_zpos()
537 * drm_plane_create_blend_mode_property - create a new blend mode property
553 * "Pre-multiplied":
555 * pre-multiplied with the alpha channel values.
559 * pre-multiplied and will do so when blending them to the background color
563 * Zero for success or -errno
568 struct drm_device *dev = plane->dev; in drm_plane_create_blend_mode_property()
572 { DRM_MODE_BLEND_PREMULTI, "Pre-multiplied" }, in drm_plane_create_blend_mode_property()
582 return -EINVAL; in drm_plane_create_blend_mode_property()
588 return -ENOMEM; in drm_plane_create_blend_mode_property()
606 drm_object_attach_property(&plane->base, prop, DRM_MODE_BLEND_PREMULTI); in drm_plane_create_blend_mode_property()
607 plane->blend_mode_property = prop; in drm_plane_create_blend_mode_property()