]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Protect DDI port to DPLL map from theoretical race.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 15 Dec 2017 22:43:10 +0000 (14:43 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 18 Dec 2017 22:38:26 +0000 (14:38 -0800)
commitbfd32f8d5091cd3ade4ea4cd0ac1310f3eb0c2dd
treef5018e384d91b36c5d75beecd7b93612f041ffc0
parent6840ddbd97e935ae8f65b6d5a628437c3a62ea75
drm/i915: Protect DDI port to DPLL map from theoretical race.

In case we have multiple modesets for different connectors
happening in parallel we could have a race on the RMW on these
shared registers.

This possibility was initially raised by Paulo when reviewing
commit 'b401f4e62c82 ("drm/i915/cnl: DDI - PLL mapping")'
but the original possibility comes from commit '67319229dfc5
("drm/i915/skl: Set the eDP link rate on DPLL0")'. Or maybe
later when atomic commits entered into picture.

Apparently the discussion around this topic showed that the
right solution would be on serializing the atomic commits in
a way that we don't have the possibility of races here since
if that parallel modeset happenings apparently many other
things will be on fire.

Code is there since SKL and there was no report of issue,
but since we never looked back to that serialization possibility,
and also we don't have an igt case for that it is better to at
least protect this corner.

Suggested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Fixes: b401f4e62c82 ("drm/i915/cnl: DDI - PLL mapping")
Fixes: 67319229dfc5 ("drm/i915/skl: Set the eDP link rate on DPLL0")
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst maarten.lankhorst@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Maarten Lankhorst maarten.lankhorst@linux.intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20171215224310.19103-1-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/intel_ddi.c