OSDN Git Service

drm/i915: Allocate enough DDB for the cursor
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 19 Mar 2019 16:03:11 +0000 (18:03 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 20 Mar 2019 15:16:08 +0000 (17:16 +0200)
commitdf331de3f8aac1a8080510d883fa40555809cddf
tree842bd02ebff0efdd6fc862c6ddc57d028b3ed01a
parentc92558aa41722f95160d96b8e1ac8dd36731a836
drm/i915: Allocate enough DDB for the cursor

Currently we just assume that 32 or 8 blocks of ddb is sufficient
for the cursor. The 32 might be, but the 8 is certainly not. The
minimum we need is at least what level 0 watermarks need, but that
is a bit restrictive, so instead let's calculate what level 7
would need for a 256x256 cursor. We'll use that to determine the
fixed ddb allocation for the cursor. This way the cursor will never
be responsible for missing out on deeper power saving states.

v2: Loop to make sure this works even if some wm levels are
    totally disabled (latency==0)

Cc: Neel Desai <neel.desai@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com> #v1
Link: https://patchwork.freedesktop.org/patch/msgid/20190319160311.23529-1-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/intel_pm.c