mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-07 13:28:06 +02:00
i915: HWZ render sub-ioctl supports waiting for pending flips on request.
This commit is contained in:
parent
2efd48b313
commit
7dc43ddeaa
2 changed files with 10 additions and 1 deletions
|
|
@ -1494,7 +1494,8 @@ static int i915_hwz_render(drm_device_t *dev,
|
|||
DRM_DEBUG("Emitting %d DWORDs of static indirect state\n",
|
||||
render->static_state_size);
|
||||
|
||||
BEGIN_RING(&dev_priv->ring, (7 * filp_priv->num_rects + 11 + 1) & ~1);
|
||||
BEGIN_RING(&dev_priv->ring, (7 * filp_priv->num_rects + 11 +
|
||||
(render->wait_flips ? 2 : 0) + 1) & ~1);
|
||||
|
||||
OUT_RING(GFX_OP_LOAD_INDIRECT | (1<<8) | (0<<14) | 1);
|
||||
OUT_RING(render->static_state_offset | (1<<1) | (1<<0));
|
||||
|
|
@ -1504,6 +1505,13 @@ static int i915_hwz_render(drm_device_t *dev,
|
|||
OUT_RING(Cache_Mode_0);
|
||||
OUT_RING(0x221 << 16 | 0x201);
|
||||
|
||||
if (render->wait_flips) {
|
||||
OUT_RING(render->wait_flips & 0x1 ?
|
||||
(MI_WAIT_FOR_EVENT | MI_WAIT_FOR_PLANE_A_FLIP) : 0);
|
||||
OUT_RING(render->wait_flips & 0x2 ?
|
||||
(MI_WAIT_FOR_EVENT | MI_WAIT_FOR_PLANE_B_FLIP) : 0);
|
||||
}
|
||||
|
||||
for (i = 0; i < filp_priv->num_bins; i++) {
|
||||
int j;
|
||||
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@ typedef struct drm_i915_hwz {
|
|||
int DR4;
|
||||
unsigned int static_state_offset;
|
||||
unsigned int static_state_size;
|
||||
unsigned int wait_flips;
|
||||
} render;
|
||||
};
|
||||
} drm_i915_hwz_t;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue