Skip to content

Commit d7e449a

Browse files
committed
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190205205056.30081-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
1 parent c7e716b commit d7e449a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6784,8 +6784,7 @@ enum {
67846784

67856785
#define _PLANE_BUF_CFG_1_B 0x7127c
67866786
#define _PLANE_BUF_CFG_2_B 0x7137c
6787-
#define SKL_DDB_ENTRY_MASK 0x3FF
6788-
#define ICL_DDB_ENTRY_MASK 0x7FF
6787+
#define DDB_ENTRY_MASK 0x7FF /* skl+: 10 bits, icl+ 11 bits */
67896788
#define DDB_ENTRY_END_SHIFT 16
67906789
#define _PLANE_BUF_CFG_1(pipe) \
67916790
_PIPE(pipe, _PLANE_BUF_CFG_1_A, _PLANE_BUF_CFG_1_B)

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3927,14 +3927,9 @@ static unsigned int skl_cursor_allocation(int num_active)
39273927
static void skl_ddb_entry_init_from_hw(struct drm_i915_private *dev_priv,
39283928
struct skl_ddb_entry *entry, u32 reg)
39293929
{
3930-
u16 mask;
39313930

3932-
if (INTEL_GEN(dev_priv) >= 11)
3933-
mask = ICL_DDB_ENTRY_MASK;
3934-
else
3935-
mask = SKL_DDB_ENTRY_MASK;
3936-
entry->start = reg & mask;
3937-
entry->end = (reg >> DDB_ENTRY_END_SHIFT) & mask;
3931+
entry->start = reg & DDB_ENTRY_MASK;
3932+
entry->end = (reg >> DDB_ENTRY_END_SHIFT) & DDB_ENTRY_MASK;
39383933

39393934
if (entry->end)
39403935
entry->end += 1;

0 commit comments

Comments
 (0)