|
185 | 185 | * plane does not expose the "alpha" property, then this is
|
186 | 186 | * assumed to be 1.0
|
187 | 187 | *
|
188 |
| - * Note that all the property extensions described here apply either to the |
189 |
| - * plane or the CRTC (e.g. for the background color, which currently is not |
190 |
| - * exposed and assumed to be black). |
191 |
| - * |
192 | 188 | * SCALING_FILTER:
|
193 | 189 | * Indicates scaling filter to be used for plane scaler
|
194 | 190 | *
|
|
201 | 197 | *
|
202 | 198 | * Drivers can set up this property for a plane by calling
|
203 | 199 | * drm_plane_create_scaling_filter_property
|
| 200 | + * |
| 201 | + * The property extensions described above all apply to the plane. Drivers |
| 202 | + * may also expose the following crtc property extension: |
| 203 | + * |
| 204 | + * BACKGROUND_COLOR: |
| 205 | + * Background color is set via drm_crtc_attach_background_color_property(). |
| 206 | + * It controls the ARGB color of a full-screen layer that exists below all |
| 207 | + * planes. This color will be used for pixels not covered by any plane and |
| 208 | + * may also be blended with plane contents as allowed by a plane's alpha |
| 209 | + * values. The background color defaults to black, and is assumed to be |
| 210 | + * black for drivers that do not expose this property. Although background |
| 211 | + * color isn't a plane, it is assumed that the color provided here |
| 212 | + * undergoes the same pipe-level degamma/CSC/gamma transformations that |
| 213 | + * planes undergo. Note that the color value provided here includes an |
| 214 | + * alpha channel, hence non-opaque background color values are allowed, but |
| 215 | + * are generally only honored in special cases (e.g. when a memory |
| 216 | + * writeback connector is in use). |
204 | 217 | */
|
205 | 218 |
|
206 | 219 | /**
|
@@ -648,3 +661,19 @@ int drm_plane_create_blend_mode_property(struct drm_plane *plane,
|
648 | 661 | return 0;
|
649 | 662 | }
|
650 | 663 | EXPORT_SYMBOL(drm_plane_create_blend_mode_property);
|
| 664 | + |
| 665 | +/** |
| 666 | + * drm_crtc_attach_background_color_property - attach background color property |
| 667 | + * @crtc: drm crtc |
| 668 | + * |
| 669 | + * Attaches the background color property to @crtc. The property defaults to |
| 670 | + * solid black and will accept 64-bit ARGB values in the format generated by |
| 671 | + * drm_argb64(). |
| 672 | + */ |
| 673 | +void drm_crtc_attach_background_color_property(struct drm_crtc *crtc) |
| 674 | +{ |
| 675 | + drm_object_attach_property(&crtc->base, |
| 676 | + crtc->dev->mode_config.background_color_property, |
| 677 | + drm_argb64(0xffff, 0, 0, 0)); |
| 678 | +} |
| 679 | +EXPORT_SYMBOL(drm_crtc_attach_background_color_property); |
0 commit comments