Re: [RFC 2/2] drm/i915: Render decompression support for Gen9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

How does VT switch work in case of rotation, setting different pixel format, etc?

- Vandana

On 12/9/2015 11:35 PM, Daniel Stone wrote:
Hi,

On 9 December 2015 at 05:15, Vandana Kannan <vandana.kannan@xxxxxxxxx> 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux