drm/i915: program wm blocks to at least blocks required per line
authorVinod Govindapillai <vinod.govindapillai@intel.com>
Sun, 17 Apr 2022 09:31:05 +0000 (12:31 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 20 Apr 2022 13:49:07 +0000 (16:49 +0300)
commitb962a068347533e72ddb60ace6d649a5b974485b
tree5694068c6f058b2ccacbd3def9a31a056f1cbf42
parent681f8a5c6e372dbfd2a313ace417e7749543de1d
drm/i915: program wm blocks to at least blocks required per line

In configurations with single DRAM channel, for usecases like
4K 60 Hz, FIFO underruns are observed quite frequently. Looks
like the wm0 watermark values need to bumped up because the wm0
memory latency calculations are probably not taking the DRAM
channel's impact into account.

As per the Bspec 49325, if the ddb allocation can hold at least
one plane_blocks_per_line we should have selected method2.
Assuming that modern HW versions have enough dbuf to hold
at least one line, set the wm blocks to equivalent to blocks
per line.

v2: styling and comments changes (Ville)
v3: Updated the reviewed-by tag
v4: max_t to max and patch styling (Ville)

References: https://gitlab.freedesktop.org/drm/intel/-/issues/4321
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220417093105.729014-1-vinod.govindapillai@intel.com
drivers/gpu/drm/i915/intel_pm.c