Commit fceeca7f authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Jani Nikula

drm/i915/display/vlv: fix pixel overlap register update

To update properly bits in the register the mask should be used
to clear old value and then the result should be or-ed with new
value, for such updates there is separate helper intel_de_rmw.
Signed-off-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221219092428.2515430-1-andrzej.hajda@intel.com
parent 60bb4478
...@@ -649,23 +649,17 @@ static void intel_dsi_port_enable(struct intel_encoder *encoder, ...@@ -649,23 +649,17 @@ static void intel_dsi_port_enable(struct intel_encoder *encoder,
enum port port; enum port port;
if (intel_dsi->dual_link == DSI_DUAL_LINK_FRONT_BACK) { if (intel_dsi->dual_link == DSI_DUAL_LINK_FRONT_BACK) {
u32 temp; u32 temp = intel_dsi->pixel_overlap;
if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv)) { if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv)) {
for_each_dsi_port(port, intel_dsi->ports) { for_each_dsi_port(port, intel_dsi->ports)
temp = intel_de_read(dev_priv, intel_de_rmw(dev_priv, MIPI_CTRL(port),
MIPI_CTRL(port)); BXT_PIXEL_OVERLAP_CNT_MASK,
temp &= ~BXT_PIXEL_OVERLAP_CNT_MASK | temp << BXT_PIXEL_OVERLAP_CNT_SHIFT);
intel_dsi->pixel_overlap <<
BXT_PIXEL_OVERLAP_CNT_SHIFT;
intel_de_write(dev_priv, MIPI_CTRL(port),
temp);
}
} else { } else {
temp = intel_de_read(dev_priv, VLV_CHICKEN_3); intel_de_rmw(dev_priv, VLV_CHICKEN_3,
temp &= ~PIXEL_OVERLAP_CNT_MASK | PIXEL_OVERLAP_CNT_MASK,
intel_dsi->pixel_overlap << temp << PIXEL_OVERLAP_CNT_SHIFT);
PIXEL_OVERLAP_CNT_SHIFT;
intel_de_write(dev_priv, VLV_CHICKEN_3, temp);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment