summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_render_state.h
diff options
context:
space:
mode:
authorArun Siluvery <arun.siluvery@linux.intel.com>2015-07-20 11:46:10 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-07-21 09:30:57 +0200
commit84e81020ee237df8af359c552b503db476b776ea (patch)
tree61a5467194d1444487e6c9ffc926c47d5b3dbd84 /drivers/gpu/drm/i915/i915_gem_render_state.h
parentdrm/i915: Do kunmap if renderstate parsing fails (diff)
downloadlinux-84e81020ee237df8af359c552b503db476b776ea.tar.xz
linux-84e81020ee237df8af359c552b503db476b776ea.zip
drm/i915: Add provision to extend Golden context batch
The Golden batch carries 3D state at the beginning so that HW starts with a known state. It is carried as a binary blob which is auto-generated from source. The idea was it would be easier to maintain and keep the complexity out of the kernel which makes sense as we don't really touch it. However if you really need to update it then you need to update generator source and keep the binary blob in sync with it. There is a need to patch this in bxt to send one additional command to enable a feature. A solution was to patch the binary data with some additional data structures (included as part of auto-generator source) but it was unnecessarily complicated. Chris suggested the idea of having a secondary batch and execute two batch buffers. It has clear advantages as we needn't touch the base golden batch, can customize secondary/auxiliary batch depending on Gen and can be carried in the driver with no dependencies. This patch adds support for this auxiliary batch which is inserted at the end of golden batch and is completely independent from it. Thanks to Mika for the preliminary review. v2: Strictly conform to the batch size requirements to cover Gen2 and add comments to clarify overflow check in macro (Chris, Mika). v3: aux_batch_offset was declared as u64, change it to u32 (Chris) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Armin Reese <armin.c.reese@intel.com> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_render_state.h')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_render_state.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_render_state.h b/drivers/gpu/drm/i915/i915_gem_render_state.h
index 7aa73728178a..e641bb093a90 100644
--- a/drivers/gpu/drm/i915/i915_gem_render_state.h
+++ b/drivers/gpu/drm/i915/i915_gem_render_state.h
@@ -37,6 +37,8 @@ struct render_state {
struct drm_i915_gem_object *obj;
u64 ggtt_offset;
int gen;
+ u32 aux_batch_size;
+ u32 aux_batch_offset;
};
int i915_gem_render_state_init(struct drm_i915_gem_request *req);