[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140320115826.GN6912@strange.amr.corp.intel.com>
Date: Thu, 20 Mar 2014 11:58:26 +0000
From: Damien Lespiau <damien.lespiau@...el.com>
To: sagar.a.kamble@...el.com
Cc: intel-gfx@...ts.freedesktop.org, airlied@...ux.ie,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/4] drm: Added plane alpha and color
blending property
On Sat, Mar 08, 2014 at 01:51:16PM +0530, sagar.a.kamble@...el.com wrote:
> From: Sagar Kamble <sagar.a.kamble@...el.com>
>
> This patch creates a generic blending enum property.
> Drivers may support subset of these values.
>
> Cc: airlied@...ux.ie
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Sagar Kamble <sagar.a.kamble@...el.com>
> ---
> drivers/gpu/drm/drm_crtc.c | 33 +++++++++++++++++++++++++++++++++
> include/drm/drm_crtc.h | 25 +++++++++++++++++++++++++
> 2 files changed, 58 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 4e43fc2..15281a3 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -4147,3 +4147,36 @@ void drm_mode_config_cleanup(struct drm_device *dev)
> idr_destroy(&dev->mode_config.crtc_idr);
> }
> EXPORT_SYMBOL(drm_mode_config_cleanup);
> +
> +struct drm_property *drm_mode_create_blend_property(struct drm_device *dev,
> + unsigned int supported_factors)
> +{
> + static const struct drm_prop_enum_list props[] = {
> + { DRM_BLEND_NONE, "none" },
> + { DRM_BLEND_ZERO, "zero" },
> + { DRM_BLEND_ONE, "one" },
> + { DRM_BLEND_SRC_COLOR, "src-color" },
> + { DRM_BLEND_ONE_MINUS_SRC_COLOR, "one-minus-src-color" },
> + { DRM_BLEND_DST_COLOR, "dst-color" },
> + { DRM_BLEND_ONE_MINUS_DST_COLOR, "one-minus-dst-color" },
> + { DRM_BLEND_SRC_ALPHA, "src-alpha" },
> + { DRM_BLEND_ONE_MINUS_SRC_ALPHA, "one-minus-src-alpha" },
> + { DRM_BLEND_DST_ALPHA, "dst-alpha" },
> + { DRM_BLEND_ONE_MINUS_DST_ALPHA, "one-minus-dst-alpha" },
> + { DRM_BLEND_CONSTANT_COLOR, "constant-color" },
> + { DRM_BLEND_ONE_MINUS_CONSTANT_COLOR, "one-minus-constant-color" },
> + { DRM_BLEND_CONSTANT_ALPHA, "constant-alpha" },
> + { DRM_BLEND_ONE_MINUS_CONSTANT_ALPHA, "one-minus-constant-alpha" },
> + { DRM_BLEND_SRC_ALPHA_SATURATE, "alpha-saturate" },
> + { DRM_BLEND_SRC1_COLOR, "src1-color" },
> + { DRM_BLEND_ONE_MINUS_SRC1_COLOR, "one-minus-src1-color" },
> + { DRM_BLEND_SRC1_ALPHA, "src1-alpha" },
> + { DRM_BLEND_ONE_MINUS_SRC1_ALPHA, "one-minus-src1-alpha" },
> + { DRM_BLEND_PREMULTIPLIED_ALPHA, "pre-multiplied-alpha" }
Again, whether the fbs are premultipled or not is orthogonal to how we
want to blend the plane. I still think it'd be better to add
premultiplied fb DRM formats.
--
Damien
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists