@@ -1816,7 +1816,7 @@ void intel_crt_init(struct drm_device *dev)
<td valign="top" >Description/Restrictions</td>
</tr>
<tr>
- <td rowspan="43" valign="top" >DRM</td>
+ <td rowspan="44" valign="top" >DRM</td>
<td valign="top" >Generic</td>
<td valign="top" >“rotation”</td>
<td valign="top" >BITMASK</td>
@@ -1868,7 +1868,7 @@ void intel_crt_init(struct drm_device *dev)
<td valign="top" >CRTC that connector is attached to (atomic)</td>
</tr>
<tr>
- <td rowspan="12" valign="top" >Plane</td>
+ <td rowspan="13" valign="top" >Plane</td>
<td valign="top" >“type”</td>
<td valign="top" >ENUM | IMMUTABLE</td>
<td valign="top" >{ "Overlay", "Primary", "Cursor" }</td>
@@ -1953,6 +1953,13 @@ void intel_crt_init(struct drm_device *dev)
<td valign="top" >Source and destination blending factors</td>
</tr>
<tr>
+ <td valign="top" >“blend_color”</td>
+ <td valign="top" >Color</td>
+ <td valign="top" >DRM_MODE_COLOR()</td>
+ <td valign="top" >Plane</td>
+ <td valign="top" >Blend constant color</td>
+ </tr>
+ <tr>
<td rowspan="2" valign="top" >DVI-I</td>
<td valign="top" >“subconnector”</td>
<td valign="top" >ENUM</td>
@@ -713,6 +713,8 @@ int drm_atomic_plane_set_property(struct drm_plane *plane,
return -EINVAL;
state->blend_mode.func = val & GENMASK(31, 0);
+ } else if (property == config->prop_blend_color) {
+ state->blend_mode.color = val;
} else if (plane->funcs->atomic_set_property) {
return plane->funcs->atomic_set_property(plane, state,
property, val);
@@ -771,6 +773,8 @@ drm_atomic_plane_get_property(struct drm_plane *plane,
*val = state->rotation;
} else if (property == config->prop_blend_func) {
*val = state->blend_mode.func;
+ } else if (property == config->prop_blend_color) {
+ *val = state->blend_mode.color;
} else if (plane->funcs->atomic_get_property) {
return plane->funcs->atomic_get_property(plane, state, property, val);
} else {
@@ -1592,6 +1592,11 @@ static int drm_mode_create_standard_properties(struct drm_device *dev)
return -ENOMEM;
dev->mode_config.prop_blend_func = prop;
+ prop = drm_property_create_range(dev, 0, "blend_color", 0, U64_MAX);
+ if (!prop)
+ return -ENOMEM;
+ dev->mode_config.prop_blend_color = prop;
+
return 0;
}
@@ -95,6 +95,10 @@ enum drm_blend_factor {
DRM_BLEND_FACTOR_ONE,
DRM_BLEND_FACTOR_SRC_ALPHA,
DRM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA,
+ DRM_BLEND_FACTOR_CONSTANT_ALPHA,
+ DRM_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA,
+ DRM_BLEND_FACTOR_CONSTANT_ALPHA_TIMES_SRC_ALPHA,
+ DRM_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA_TIMES_SRC_ALPHA,
};
#define DRM_BLEND_FUNC(src_factor, dst_factor) \
@@ -103,6 +107,7 @@ enum drm_blend_factor {
#define DRM_BLEND_FUNC_DST_FACTOR(val) ((val) & 0xffff)
struct drm_blend_mode {
+ uint64_t color;
uint64_t func;
};
@@ -2145,6 +2150,7 @@ struct drm_mode_config {
struct drm_property *prop_active;
struct drm_property *prop_mode_id;
struct drm_property *prop_blend_func;
+ struct drm_property *prop_blend_color;
/* DVI-I properties */
struct drm_property *dvi_i_subconnector_property;