Ville Syrjälä
17419f5c6d
drm/i915: Protect CRC reg macro arguments for consistency
...
It's probably a good idea to start protecting all macro arguments
to avoid any cargo-cult mistakes when people go looking for examples
of how to define these things.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-8-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:49:02 +03:00
Ville Syrjälä
fddb9fa961
drm/i915: Define the PIPE_CRC_EXP registers
...
I need a scratch register which fill the following requirements:
- can be accessed via DSB
- all the bits can be read/written
- no serious side effects
So far the only thing I could think of is the "expected CRC"
register. Add the definition so I can use it.
While I only need the hsw+ variant currently, let's define the
older variants as well for completeness.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-7-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:48:01 +03:00
Ville Syrjälä
31951bbe3e
drm/i915: Document which platforms have which CRC registers
...
Sprinkle some comments around to indicate which CRC registers
are valid for which platforms.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:47:50 +03:00
Ville Syrjälä
7bd7cfa833
drm/i915: Add a separate definition for PIPE_CRC_RES_HSW
...
On hsw+ we only have one CRC result register, instead of the
five we have on ivb, and some of the others have been repurposed
to serve other CRC related purposes.
Since the hsw+ vs. pre-hsw register operate quite differently
let's add a separate definition for the hsw+ variant to make the
situation a bit more clear. Also since we only use this from a
hsw+ codepath there is no real benefit to be had with reusing
the ivb register definition.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:46:59 +03:00
Ville Syrjälä
1ec6defe71
drm/i915: Regroup pipe CRC regs
...
Put all the definitions related to a single pipe CRC register
in one place, instead of the current approach where things are
spread all over the place.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:46:43 +03:00
Ville Syrjälä
1c1bfd8b0b
drm/i915: Switch PIPE_CRC_RES_*_IVB to _MMIO_PIPE()
...
PIPE_CRC_RES_*_IVB are proper pipe registers, and only valid
for IVB+ where pipe register blocks are equally spaced, so we
can switch from _MMIO_TRANS2() to the simpler _MMIO_PIPE() for
these.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:46:34 +03:00
Ville Syrjälä
ccb6ba9eba
drm/i915: Extract intel_pipe_crc_regs.h
...
The CRC registers are a pretty self contained bunch.
Extract them to a separate header to declutter i915_reg.h.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240531115342.2763-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-06-05 12:46:26 +03:00