Commit 0d6e08c7 authored by Lucas De Marchi's avatar Lucas De Marchi

drm/i915: Convert MBUS_ABOX_CTL() to _PICK_EVEN_2RANGES()

MBUS_ABOX_CTL() can use _PICK_EVEN_2RANGES instead of _PICK, which
reduces the size and is safer.
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarAnusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230120193457.3295977-8-lucas.demarchi@intel.com
parent c886118b
...@@ -1040,9 +1040,11 @@ ...@@ -1040,9 +1040,11 @@
#define _MBUS_ABOX0_CTL 0x45038 #define _MBUS_ABOX0_CTL 0x45038
#define _MBUS_ABOX1_CTL 0x45048 #define _MBUS_ABOX1_CTL 0x45048
#define _MBUS_ABOX2_CTL 0x4504C #define _MBUS_ABOX2_CTL 0x4504C
#define MBUS_ABOX_CTL(x) _MMIO(_PICK(x, _MBUS_ABOX0_CTL, \ #define MBUS_ABOX_CTL(x) \
_MBUS_ABOX1_CTL, \ _MMIO(_PICK_EVEN_2RANGES(x, 2, \
_MBUS_ABOX2_CTL)) _MBUS_ABOX0_CTL, _MBUS_ABOX1_CTL, \
_MBUS_ABOX2_CTL, _MBUS_ABOX2_CTL))
#define MBUS_ABOX_BW_CREDIT_MASK (3 << 20) #define MBUS_ABOX_BW_CREDIT_MASK (3 << 20)
#define MBUS_ABOX_BW_CREDIT(x) ((x) << 20) #define MBUS_ABOX_BW_CREDIT(x) ((x) << 20)
#define MBUS_ABOX_B_CREDIT_MASK (0xF << 16) #define MBUS_ABOX_B_CREDIT_MASK (0xF << 16)
......
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