Commit d7e449a8 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Just use icl+ definition for PLANE_WM blocks field

The unused bits on PLANE_WM & co. are hardwired to zero. So no
need to worry about reading the extra bit on pre-icl.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190205205056.30081-2-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent c7e716b8
...@@ -6784,8 +6784,7 @@ enum { ...@@ -6784,8 +6784,7 @@ enum {
#define _PLANE_BUF_CFG_1_B 0x7127c #define _PLANE_BUF_CFG_1_B 0x7127c
#define _PLANE_BUF_CFG_2_B 0x7137c #define _PLANE_BUF_CFG_2_B 0x7137c
#define SKL_DDB_ENTRY_MASK 0x3FF #define DDB_ENTRY_MASK 0x7FF /* skl+: 10 bits, icl+ 11 bits */
#define ICL_DDB_ENTRY_MASK 0x7FF
#define DDB_ENTRY_END_SHIFT 16 #define DDB_ENTRY_END_SHIFT 16
#define _PLANE_BUF_CFG_1(pipe) \ #define _PLANE_BUF_CFG_1(pipe) \
_PIPE(pipe, _PLANE_BUF_CFG_1_A, _PLANE_BUF_CFG_1_B) _PIPE(pipe, _PLANE_BUF_CFG_1_A, _PLANE_BUF_CFG_1_B)
......
...@@ -3927,14 +3927,9 @@ static unsigned int skl_cursor_allocation(int num_active) ...@@ -3927,14 +3927,9 @@ static unsigned int skl_cursor_allocation(int num_active)
static void skl_ddb_entry_init_from_hw(struct drm_i915_private *dev_priv, static void skl_ddb_entry_init_from_hw(struct drm_i915_private *dev_priv,
struct skl_ddb_entry *entry, u32 reg) struct skl_ddb_entry *entry, u32 reg)
{ {
u16 mask;
if (INTEL_GEN(dev_priv) >= 11) entry->start = reg & DDB_ENTRY_MASK;
mask = ICL_DDB_ENTRY_MASK; entry->end = (reg >> DDB_ENTRY_END_SHIFT) & DDB_ENTRY_MASK;
else
mask = SKL_DDB_ENTRY_MASK;
entry->start = reg & mask;
entry->end = (reg >> DDB_ENTRY_END_SHIFT) & mask;
if (entry->end) if (entry->end)
entry->end += 1; entry->end += 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment