summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2015-12-23 18:28:11 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2016-01-29 18:08:38 -0200
commitb183b3f143959b8eea5d0970fd4ffe78df3a0210 (patch)
tree3454f5cdc4deda6234eda2e5f627b90b69c103e2 /drivers/gpu/drm/i915/i915_drv.h
parent44a8a257087bf5deb8c77bbb640cf0a15643b017 (diff)
downloadop-kernel-dev-b183b3f143959b8eea5d0970fd4ffe78df3a0210.zip
op-kernel-dev-b183b3f143959b8eea5d0970fd4ffe78df3a0210.tar.gz
drm/i915/fbc: introduce struct intel_fbc_reg_params
The early return inside __intel_fbc_update does not completely check all the parameters that affect the FBC register values. For example, we currently lack looking at crtc->adjusted_y (for the fence Y offset) and all the parameters that affect the CFB size (for i8xx). Instead of just adding the missing parameters to the check and hoping that any changes to the fbc_activate functions also come with a matching change to the __intel_fbc_update check, introduce a new structure where we store these parameters and use the structure at the fbc_activate function. Of course, it's still possible to access everything from dev_priv in those functions, but IMHO the new code will be harder to break. v2: Rebase. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1453210558-7875-5-git-send-email-paulo.r.zanoni@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 83b629b..99bac7e 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -905,11 +905,9 @@ struct i915_fbc {
* it's the outer lock when overlapping with stolen_lock. */
struct mutex lock;
unsigned threshold;
- unsigned int fb_id;
unsigned int possible_framebuffer_bits;
unsigned int busy_bits;
struct intel_crtc *crtc;
- int y;
struct drm_mm_node compressed_fb;
struct drm_mm_node *compressed_llb;
@@ -919,6 +917,24 @@ struct i915_fbc {
bool enabled;
bool active;
+ struct intel_fbc_reg_params {
+ struct {
+ enum pipe pipe;
+ enum plane plane;
+ unsigned int fence_y_offset;
+ } crtc;
+
+ struct {
+ u64 ggtt_offset;
+ uint32_t id;
+ uint32_t pixel_format;
+ unsigned int stride;
+ int fence_reg;
+ } fb;
+
+ int cfb_size;
+ } params;
+
struct intel_fbc_work {
bool scheduled;
u32 scheduled_vblank;
@@ -929,7 +945,7 @@ struct i915_fbc {
const char *no_fbc_reason;
bool (*is_active)(struct drm_i915_private *dev_priv);
- void (*activate)(struct intel_crtc *crtc);
+ void (*activate)(struct drm_i915_private *dev_priv);
void (*deactivate)(struct drm_i915_private *dev_priv);
};
OpenPOWER on IntegriCloud