[Intel-gfx] [RFC 2/2] drm/i915: Render decompression support for Gen9

Daniel Stone daniel at fooishbar.org
Wed Dec 9 10:05:58 PST 2015


Hi,

On 9 December 2015 at 05:15, Vandana Kannan <vandana.kannan at intel.com> wrote:
> This patch includes enabling render decompression after checking all the
> requirements (format, tiling, rotation etc.). Along with this, the WAs
> mentioned in BSpec Workaround page have been implemented.
> In case, any of the conditions fail, the flip will fail.
>
> [...]
>
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -222,8 +222,13 @@ intel_plane_atomic_get_property(struct drm_plane *plane,
>                                 struct drm_property *property,
>                                 uint64_t *val)
>  {
> -       DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name);
> -       return -EINVAL;
> +       if (property == dev_priv->render_comp_property) {
> +               *val = intel_state->render_comp_enable;
> +       } else {
> +               DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name);
> +               return -EINVAL;
> +       }
> +       return 0;
>  }
>
>  /**
> @@ -244,6 +249,11 @@ intel_plane_atomic_set_property(struct drm_plane *plane,
>                                 struct drm_property *property,
>                                 uint64_t val)
>  {
> -       DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name);
> -       return -EINVAL;
> +       if (property == dev_priv->render_comp_property) {
> +               intel_state->render_comp_enable = val;
> +       } else {
> +               DRM_DEBUG_KMS("Unknown plane property '%s'\n", property->name);
> +               return -EINVAL;
> +       }
> +       return 0;

Using this as a property is a concern to me. Under the following
scenario, you can easily trigger a failure:
  - compression-aware client runs and sets compression to true on the
primary plane
  - VT switch
  - non-compression-aware client takes over, changes the FB to a
non-compressed buffer, leaves compression property alone as it is
unaware of it
  - ???

It seems like the best thing to do in this case is to make compression
a property of the FB, through modifiers. This also enables seamless
use of render compression from clients using EGL/GBM, where GBM just
hands a buffer over to the client and lets the client deal with
presenting it through KMS. In this case, the client is not aware if
compression should be enabled or not.

Cheers,
Daniel


More information about the Intel-gfx mailing list