drm/i915: Simplify i915_reg_read_ioctl
Convert to use the freshly available made INTEL_GEN_MASK for easier grepping and improve function readability and clarify the UABI documentation. No functional changes. v2: - Lift GEM_BUG_ONs and use is_power_of_2 (Chris) - Retain -EINVAL on bad flags behavior (Chris) v3: - Extract flags with 'entry->size - 1' (Chris) v4: - Add GEM_BUG_ON on for flags vs entry offset (Chris) v5: - Use 'u16' to match 'dev_priv' (Ville) v6: - Fix checkpatch.pl errors Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20170913115255.13851-2-joonas.lahtinen@linux.intel.com
This commit is contained in:
@@ -1308,14 +1308,16 @@ struct drm_i915_reg_read {
|
||||
* be specified
|
||||
*/
|
||||
__u64 offset;
|
||||
#define I915_REG_READ_8B_WA BIT(0)
|
||||
|
||||
__u64 val; /* Return value */
|
||||
};
|
||||
/* Known registers:
|
||||
*
|
||||
* Render engine timestamp - 0x2358 + 64bit - gen7+
|
||||
* - Note this register returns an invalid value if using the default
|
||||
* single instruction 8byte read, in order to workaround that use
|
||||
* offset (0x2538 | 1) instead.
|
||||
* single instruction 8byte read, in order to workaround that pass
|
||||
* flag I915_REG_READ_8B_WA in offset field.
|
||||
*
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user