* [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
@ 2018-04-09 12:46 Maarten Lankhorst
2018-04-09 12:46 ` [PATCH 2/4] drm/i915: Remove get_existing_crtc_state Maarten Lankhorst
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Maarten Lankhorst @ 2018-04-09 12:46 UTC (permalink / raw)
To: intel-gfx
The get_existing macros are deprecated and should be replaced by
get_old/new_state for clarity.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_atomic.c | 5 +++--
drivers/gpu/drm/i915/intel_drv.h | 11 -----------
drivers/gpu/drm/i915/intel_pm.c | 2 +-
3 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index bb8c1687823e..40285d1b91b7 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -227,6 +227,7 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
struct intel_crtc_scaler_state *scaler_state =
&crtc_state->scaler_state;
struct drm_atomic_state *drm_state = crtc_state->base.state;
+ struct intel_atomic_state *intel_state = to_intel_atomic_state(drm_state);
int num_scalers_need;
int i, j;
@@ -304,8 +305,8 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
continue;
}
- plane_state = intel_atomic_get_existing_plane_state(drm_state,
- intel_plane);
+ plane_state = intel_atomic_get_new_plane_state(intel_state,
+ intel_plane);
scaler_id = &plane_state->scaler_id;
}
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index b2e0fa04ef5b..e545aa673bd9 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -2109,17 +2109,6 @@ intel_atomic_get_existing_crtc_state(struct drm_atomic_state *state,
return NULL;
}
-static inline struct intel_plane_state *
-intel_atomic_get_existing_plane_state(struct drm_atomic_state *state,
- struct intel_plane *plane)
-{
- struct drm_plane_state *plane_state;
-
- plane_state = drm_atomic_get_existing_plane_state(state, &plane->base);
-
- return to_intel_plane_state(plane_state);
-}
-
int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
struct intel_crtc *intel_crtc,
struct intel_crtc_state *crtc_state);
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 007a12ebe725..fb24b44ec37f 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5037,7 +5037,7 @@ skl_ddb_add_affected_planes(struct intel_crtc_state *cstate)
struct drm_plane *plane;
enum pipe pipe = intel_crtc->pipe;
- WARN_ON(!drm_atomic_get_existing_crtc_state(state, crtc));
+ WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));
drm_for_each_plane_mask(plane, dev, cstate->base.plane_mask) {
enum plane_id plane_id = to_intel_plane(plane)->id;
--
2.16.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/4] drm/i915: Remove get_existing_crtc_state
2018-04-09 12:46 [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Maarten Lankhorst
@ 2018-04-09 12:46 ` Maarten Lankhorst
2018-04-09 12:57 ` Ville Syrjälä
2018-04-09 12:46 ` [PATCH 3/4] drm/i915: Remove last references to drm_atomic_get_existing* macros Maarten Lankhorst
` (5 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Maarten Lankhorst @ 2018-04-09 12:46 UTC (permalink / raw)
To: intel-gfx
get_existing_crtc_state is currently unused, get rid of it.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_drv.h | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index e545aa673bd9..9969309132d0 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -2095,20 +2095,6 @@ intel_atomic_get_crtc_state(struct drm_atomic_state *state,
return to_intel_crtc_state(crtc_state);
}
-static inline struct intel_crtc_state *
-intel_atomic_get_existing_crtc_state(struct drm_atomic_state *state,
- struct intel_crtc *crtc)
-{
- struct drm_crtc_state *crtc_state;
-
- crtc_state = drm_atomic_get_existing_crtc_state(state, &crtc->base);
-
- if (crtc_state)
- return to_intel_crtc_state(crtc_state);
- else
- return NULL;
-}
-
int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
struct intel_crtc *intel_crtc,
struct intel_crtc_state *crtc_state);
--
2.16.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/4] drm/i915: Remove last references to drm_atomic_get_existing* macros
2018-04-09 12:46 [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Maarten Lankhorst
2018-04-09 12:46 ` [PATCH 2/4] drm/i915: Remove get_existing_crtc_state Maarten Lankhorst
@ 2018-04-09 12:46 ` Maarten Lankhorst
2018-04-09 13:04 ` Ville Syrjälä
2018-04-09 12:46 ` [PATCH 4/4] drm/i915: Enable display workaround 827 for all planes Maarten Lankhorst
` (4 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Maarten Lankhorst @ 2018-04-09 12:46 UTC (permalink / raw)
To: intel-gfx
All the references to get_existing_state can be converted to
get_new_state or get_old_state, which means that i915 is now
get_existing_state free.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 51 ++++++++++++++++--------------------
1 file changed, 23 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d42b635c6807..487a6e235222 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5148,8 +5148,8 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
intel_atomic_get_new_crtc_state(to_intel_atomic_state(old_state),
crtc);
struct drm_plane *primary = crtc->base.primary;
- struct drm_plane_state *old_pri_state =
- drm_atomic_get_existing_plane_state(old_state, primary);
+ struct drm_plane_state *old_primary_state =
+ drm_atomic_get_old_plane_state(old_state, primary);
intel_frontbuffer_flip(to_i915(crtc->base.dev), pipe_config->fb_bits);
@@ -5159,19 +5159,16 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
if (hsw_post_update_enable_ips(old_crtc_state, pipe_config))
hsw_enable_ips(pipe_config);
- if (old_pri_state) {
- struct intel_plane_state *primary_state =
- intel_atomic_get_new_plane_state(to_intel_atomic_state(old_state),
- to_intel_plane(primary));
- struct intel_plane_state *old_primary_state =
- to_intel_plane_state(old_pri_state);
- struct drm_framebuffer *fb = primary_state->base.fb;
+ if (old_primary_state) {
+ struct drm_plane_state *new_primary_state =
+ drm_atomic_get_new_plane_state(old_state, primary);
+ struct drm_framebuffer *fb = new_primary_state->fb;
intel_fbc_post_update(crtc);
- if (primary_state->base.visible &&
+ if (new_primary_state->visible &&
(needs_modeset(&pipe_config->base) ||
- !old_primary_state->base.visible))
+ !old_primary_state->visible))
intel_post_enable_primary(&crtc->base, pipe_config);
/* Display WA 827 */
@@ -5192,8 +5189,8 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_atomic_state *old_state = old_crtc_state->base.state;
struct drm_plane *primary = crtc->base.primary;
- struct drm_plane_state *old_pri_state =
- drm_atomic_get_existing_plane_state(old_state, primary);
+ struct drm_plane_state *old_primary_state =
+ drm_atomic_get_old_plane_state(old_state, primary);
bool modeset = needs_modeset(&pipe_config->base);
struct intel_atomic_state *old_intel_state =
to_intel_atomic_state(old_state);
@@ -5201,13 +5198,11 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
if (hsw_pre_update_disable_ips(old_crtc_state, pipe_config))
hsw_disable_ips(old_crtc_state);
- if (old_pri_state) {
- struct intel_plane_state *primary_state =
+ if (old_primary_state) {
+ struct intel_plane_state *new_primary_state =
intel_atomic_get_new_plane_state(old_intel_state,
to_intel_plane(primary));
- struct intel_plane_state *old_primary_state =
- to_intel_plane_state(old_pri_state);
- struct drm_framebuffer *fb = primary_state->base.fb;
+ struct drm_framebuffer *fb = new_primary_state->base.fb;
/* Display WA 827 */
if ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
@@ -5216,13 +5211,13 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
skl_wa_clkgate(dev_priv, crtc->pipe, true);
}
- intel_fbc_pre_update(crtc, pipe_config, primary_state);
+ intel_fbc_pre_update(crtc, pipe_config, new_primary_state);
/*
* Gen2 reports pipe underruns whenever all planes are disabled.
* So disable underrun reporting before all the planes get disabled.
*/
- if (IS_GEN2(dev_priv) && old_primary_state->base.visible &&
- (modeset || !primary_state->base.visible))
+ if (IS_GEN2(dev_priv) && old_primary_state->visible &&
+ (modeset || !new_primary_state->base.visible))
intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, false);
}
@@ -10836,7 +10831,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
struct drm_connector_state *connector_state;
struct intel_encoder *encoder;
- connector_state = drm_atomic_get_existing_connector_state(state, connector);
+ connector_state = drm_atomic_get_new_connector_state(state, connector);
if (!connector_state)
connector_state = connector->state;
@@ -12199,6 +12194,9 @@ static void intel_update_crtc(struct drm_crtc *crtc,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_crtc_state *pipe_config = to_intel_crtc_state(new_crtc_state);
bool modeset = needs_modeset(new_crtc_state);
+ struct intel_plane_state *new_plane_state =
+ intel_atomic_get_new_plane_state(to_intel_atomic_state(state),
+ to_intel_plane(crtc->primary));
if (modeset) {
update_scanline_offset(intel_crtc);
@@ -12211,11 +12209,8 @@ static void intel_update_crtc(struct drm_crtc *crtc,
pipe_config);
}
- if (drm_atomic_get_existing_plane_state(state, crtc->primary)) {
- intel_fbc_enable(
- intel_crtc, pipe_config,
- to_intel_plane_state(crtc->primary->state));
- }
+ if (new_plane_state)
+ intel_fbc_enable(intel_crtc, pipe_config, new_plane_state);
drm_atomic_helper_commit_planes_on_crtc(old_crtc_state);
}
@@ -12796,7 +12791,7 @@ intel_prepare_plane_fb(struct drm_plane *plane,
if (old_obj) {
struct drm_crtc_state *crtc_state =
- drm_atomic_get_existing_crtc_state(new_state->state,
+ drm_atomic_get_new_crtc_state(new_state->state,
plane->state->crtc);
/* Big Hammer, we also need to ensure that any pending
--
2.16.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/4] drm/i915: Enable display workaround 827 for all planes.
2018-04-09 12:46 [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Maarten Lankhorst
2018-04-09 12:46 ` [PATCH 2/4] drm/i915: Remove get_existing_crtc_state Maarten Lankhorst
2018-04-09 12:46 ` [PATCH 3/4] drm/i915: Remove last references to drm_atomic_get_existing* macros Maarten Lankhorst
@ 2018-04-09 12:46 ` Maarten Lankhorst
2018-04-09 13:11 ` Ville Syrjälä
2018-04-09 12:57 ` [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Ville Syrjälä
` (3 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Maarten Lankhorst @ 2018-04-09 12:46 UTC (permalink / raw)
To: intel-gfx
The workaround was applied only to the primary plane, but is required
on all planes. Iterate over all planes in the crtc atomic check to see
if the workaround is enabled, and only perform the actual toggling in
the pre/post plane update functions.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 40 +++++++++++++++++++++---------------
drivers/gpu/drm/i915/intel_drv.h | 1 +
2 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 487a6e235222..829b593a3cee 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5162,7 +5162,6 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
if (old_primary_state) {
struct drm_plane_state *new_primary_state =
drm_atomic_get_new_plane_state(old_state, primary);
- struct drm_framebuffer *fb = new_primary_state->fb;
intel_fbc_post_update(crtc);
@@ -5170,15 +5169,11 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
(needs_modeset(&pipe_config->base) ||
!old_primary_state->visible))
intel_post_enable_primary(&crtc->base, pipe_config);
-
- /* Display WA 827 */
- if ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
- IS_CANNONLAKE(dev_priv)) {
- if (fb && fb->format->format == DRM_FORMAT_NV12)
- skl_wa_clkgate(dev_priv, crtc->pipe, false);
- }
-
}
+
+ /* Display WA 827 */
+ if (old_crtc_state->nv12_wa && !pipe_config->nv12_wa)
+ skl_wa_clkgate(dev_priv, crtc->pipe, false);
}
static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
@@ -5202,14 +5197,6 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
struct intel_plane_state *new_primary_state =
intel_atomic_get_new_plane_state(old_intel_state,
to_intel_plane(primary));
- struct drm_framebuffer *fb = new_primary_state->base.fb;
-
- /* Display WA 827 */
- if ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
- IS_CANNONLAKE(dev_priv)) {
- if (fb && fb->format->format == DRM_FORMAT_NV12)
- skl_wa_clkgate(dev_priv, crtc->pipe, true);
- }
intel_fbc_pre_update(crtc, pipe_config, new_primary_state);
/*
@@ -5221,6 +5208,10 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, false);
}
+ /* Display WA 827 */
+ if (!old_crtc_state->nv12_wa && pipe_config->nv12_wa)
+ skl_wa_clkgate(dev_priv, crtc->pipe, true);
+
/*
* Vblank time updates from the shadow to live plane control register
* are blocked if the memory self-refresh mode is active at that
@@ -10485,6 +10476,21 @@ static int intel_crtc_atomic_check(struct drm_crtc *crtc,
return ret;
}
+ pipe_config->nv12_wa = false;
+
+ /* Apply display WA 827 if required. */
+ if (crtc_state->active &&
+ ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
+ IS_CANNONLAKE(dev_priv))) {
+ struct drm_plane *plane;
+ const struct drm_plane_state *plane_state;
+
+ drm_atomic_crtc_state_for_each_plane_state(plane, plane_state, crtc_state)
+ if (plane_state->fb &&
+ plane_state->fb->format->format == DRM_FORMAT_NV12)
+ pipe_config->nv12_wa = true;
+ }
+
if (crtc_state->color_mgmt_changed) {
ret = intel_color_check(crtc, crtc_state);
if (ret)
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 9969309132d0..9c2b7f78d5dd 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -723,6 +723,7 @@ struct intel_crtc_state {
bool update_wm_pre, update_wm_post; /* watermarks are updated */
bool fb_changed; /* fb on any of the planes is changed */
bool fifo_changed; /* FIFO split is changed */
+ bool nv12_wa; /* Whether display WA 827 needs to be enabled. */
/* Pipe source size (ie. panel fitter input size)
* All planes will be positioned inside this space,
--
2.16.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
2018-04-09 12:46 [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Maarten Lankhorst
` (2 preceding siblings ...)
2018-04-09 12:46 ` [PATCH 4/4] drm/i915: Enable display workaround 827 for all planes Maarten Lankhorst
@ 2018-04-09 12:57 ` Ville Syrjälä
2018-04-09 14:01 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjälä @ 2018-04-09 12:57 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
On Mon, Apr 09, 2018 at 02:46:53PM +0200, Maarten Lankhorst wrote:
> The get_existing macros are deprecated and should be replaced by
> get_old/new_state for clarity.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_atomic.c | 5 +++--
> drivers/gpu/drm/i915/intel_drv.h | 11 -----------
> drivers/gpu/drm/i915/intel_pm.c | 2 +-
> 3 files changed, 4 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> index bb8c1687823e..40285d1b91b7 100644
> --- a/drivers/gpu/drm/i915/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/intel_atomic.c
> @@ -227,6 +227,7 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
> struct intel_crtc_scaler_state *scaler_state =
> &crtc_state->scaler_state;
> struct drm_atomic_state *drm_state = crtc_state->base.state;
> + struct intel_atomic_state *intel_state = to_intel_atomic_state(drm_state);
> int num_scalers_need;
> int i, j;
>
> @@ -304,8 +305,8 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
> continue;
> }
>
> - plane_state = intel_atomic_get_existing_plane_state(drm_state,
> - intel_plane);
> + plane_state = intel_atomic_get_new_plane_state(intel_state,
> + intel_plane);
> scaler_id = &plane_state->scaler_id;
> }
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index b2e0fa04ef5b..e545aa673bd9 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -2109,17 +2109,6 @@ intel_atomic_get_existing_crtc_state(struct drm_atomic_state *state,
> return NULL;
> }
>
> -static inline struct intel_plane_state *
> -intel_atomic_get_existing_plane_state(struct drm_atomic_state *state,
> - struct intel_plane *plane)
> -{
> - struct drm_plane_state *plane_state;
> -
> - plane_state = drm_atomic_get_existing_plane_state(state, &plane->base);
> -
> - return to_intel_plane_state(plane_state);
> -}
> -
> int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
> struct intel_crtc *intel_crtc,
> struct intel_crtc_state *crtc_state);
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 007a12ebe725..fb24b44ec37f 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5037,7 +5037,7 @@ skl_ddb_add_affected_planes(struct intel_crtc_state *cstate)
> struct drm_plane *plane;
> enum pipe pipe = intel_crtc->pipe;
>
> - WARN_ON(!drm_atomic_get_existing_crtc_state(state, crtc));
> + WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));
This assert seems rather pointless since we got the drm_atomic_state via
cstate->base.state.
Anyways, patch is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> drm_for_each_plane_mask(plane, dev, cstate->base.plane_mask) {
> enum plane_id plane_id = to_intel_plane(plane)->id;
> --
> 2.16.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] drm/i915: Remove get_existing_crtc_state
2018-04-09 12:46 ` [PATCH 2/4] drm/i915: Remove get_existing_crtc_state Maarten Lankhorst
@ 2018-04-09 12:57 ` Ville Syrjälä
0 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjälä @ 2018-04-09 12:57 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
On Mon, Apr 09, 2018 at 02:46:54PM +0200, Maarten Lankhorst wrote:
> get_existing_crtc_state is currently unused, get rid of it.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_drv.h | 14 --------------
> 1 file changed, 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index e545aa673bd9..9969309132d0 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -2095,20 +2095,6 @@ intel_atomic_get_crtc_state(struct drm_atomic_state *state,
> return to_intel_crtc_state(crtc_state);
> }
>
> -static inline struct intel_crtc_state *
> -intel_atomic_get_existing_crtc_state(struct drm_atomic_state *state,
> - struct intel_crtc *crtc)
> -{
> - struct drm_crtc_state *crtc_state;
> -
> - crtc_state = drm_atomic_get_existing_crtc_state(state, &crtc->base);
> -
> - if (crtc_state)
> - return to_intel_crtc_state(crtc_state);
> - else
> - return NULL;
> -}
> -
> int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
> struct intel_crtc *intel_crtc,
> struct intel_crtc_state *crtc_state);
> --
> 2.16.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/4] drm/i915: Remove last references to drm_atomic_get_existing* macros
2018-04-09 12:46 ` [PATCH 3/4] drm/i915: Remove last references to drm_atomic_get_existing* macros Maarten Lankhorst
@ 2018-04-09 13:04 ` Ville Syrjälä
2018-04-09 14:04 ` Maarten Lankhorst
0 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjälä @ 2018-04-09 13:04 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
On Mon, Apr 09, 2018 at 02:46:55PM +0200, Maarten Lankhorst wrote:
> All the references to get_existing_state can be converted to
> get_new_state or get_old_state, which means that i915 is now
> get_existing_state free.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 51 ++++++++++++++++--------------------
> 1 file changed, 23 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index d42b635c6807..487a6e235222 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5148,8 +5148,8 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
> intel_atomic_get_new_crtc_state(to_intel_atomic_state(old_state),
> crtc);
> struct drm_plane *primary = crtc->base.primary;
> - struct drm_plane_state *old_pri_state =
> - drm_atomic_get_existing_plane_state(old_state, primary);
> + struct drm_plane_state *old_primary_state =
> + drm_atomic_get_old_plane_state(old_state, primary);
>
> intel_frontbuffer_flip(to_i915(crtc->base.dev), pipe_config->fb_bits);
>
> @@ -5159,19 +5159,16 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
> if (hsw_post_update_enable_ips(old_crtc_state, pipe_config))
> hsw_enable_ips(pipe_config);
>
> - if (old_pri_state) {
> - struct intel_plane_state *primary_state =
> - intel_atomic_get_new_plane_state(to_intel_atomic_state(old_state),
> - to_intel_plane(primary));
> - struct intel_plane_state *old_primary_state =
> - to_intel_plane_state(old_pri_state);
> - struct drm_framebuffer *fb = primary_state->base.fb;
> + if (old_primary_state) {
> + struct drm_plane_state *new_primary_state =
> + drm_atomic_get_new_plane_state(old_state, primary);
> + struct drm_framebuffer *fb = new_primary_state->fb;
>
> intel_fbc_post_update(crtc);
>
> - if (primary_state->base.visible &&
> + if (new_primary_state->visible &&
> (needs_modeset(&pipe_config->base) ||
> - !old_primary_state->base.visible))
> + !old_primary_state->visible))
> intel_post_enable_primary(&crtc->base, pipe_config);
>
> /* Display WA 827 */
> @@ -5192,8 +5189,8 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
> struct drm_i915_private *dev_priv = to_i915(dev);
> struct drm_atomic_state *old_state = old_crtc_state->base.state;
> struct drm_plane *primary = crtc->base.primary;
> - struct drm_plane_state *old_pri_state =
> - drm_atomic_get_existing_plane_state(old_state, primary);
> + struct drm_plane_state *old_primary_state =
> + drm_atomic_get_old_plane_state(old_state, primary);
> bool modeset = needs_modeset(&pipe_config->base);
> struct intel_atomic_state *old_intel_state =
> to_intel_atomic_state(old_state);
> @@ -5201,13 +5198,11 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
> if (hsw_pre_update_disable_ips(old_crtc_state, pipe_config))
> hsw_disable_ips(old_crtc_state);
>
> - if (old_pri_state) {
> - struct intel_plane_state *primary_state =
> + if (old_primary_state) {
> + struct intel_plane_state *new_primary_state =
> intel_atomic_get_new_plane_state(old_intel_state,
> to_intel_plane(primary));
> - struct intel_plane_state *old_primary_state =
> - to_intel_plane_state(old_pri_state);
> - struct drm_framebuffer *fb = primary_state->base.fb;
> + struct drm_framebuffer *fb = new_primary_state->base.fb;
>
> /* Display WA 827 */
> if ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
> @@ -5216,13 +5211,13 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
> skl_wa_clkgate(dev_priv, crtc->pipe, true);
> }
>
> - intel_fbc_pre_update(crtc, pipe_config, primary_state);
> + intel_fbc_pre_update(crtc, pipe_config, new_primary_state);
> /*
> * Gen2 reports pipe underruns whenever all planes are disabled.
> * So disable underrun reporting before all the planes get disabled.
> */
> - if (IS_GEN2(dev_priv) && old_primary_state->base.visible &&
> - (modeset || !primary_state->base.visible))
> + if (IS_GEN2(dev_priv) && old_primary_state->visible &&
> + (modeset || !new_primary_state->base.visible))
> intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, false);
> }
>
> @@ -10836,7 +10831,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
> struct drm_connector_state *connector_state;
> struct intel_encoder *encoder;
>
> - connector_state = drm_atomic_get_existing_connector_state(state, connector);
> + connector_state = drm_atomic_get_new_connector_state(state, connector);
> if (!connector_state)
> connector_state = connector->state;
>
> @@ -12199,6 +12194,9 @@ static void intel_update_crtc(struct drm_crtc *crtc,
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> struct intel_crtc_state *pipe_config = to_intel_crtc_state(new_crtc_state);
> bool modeset = needs_modeset(new_crtc_state);
> + struct intel_plane_state *new_plane_state =
> + intel_atomic_get_new_plane_state(to_intel_atomic_state(state),
> + to_intel_plane(crtc->primary));
>
> if (modeset) {
> update_scanline_offset(intel_crtc);
> @@ -12211,11 +12209,8 @@ static void intel_update_crtc(struct drm_crtc *crtc,
> pipe_config);
> }
>
> - if (drm_atomic_get_existing_plane_state(state, crtc->primary)) {
> - intel_fbc_enable(
> - intel_crtc, pipe_config,
> - to_intel_plane_state(crtc->primary->state));
> - }
> + if (new_plane_state)
> + intel_fbc_enable(intel_crtc, pipe_config, new_plane_state);
>
> drm_atomic_helper_commit_planes_on_crtc(old_crtc_state);
> }
> @@ -12796,7 +12791,7 @@ intel_prepare_plane_fb(struct drm_plane *plane,
>
> if (old_obj) {
> struct drm_crtc_state *crtc_state =
> - drm_atomic_get_existing_crtc_state(new_state->state,
> + drm_atomic_get_new_crtc_state(new_state->state,
> plane->state->crtc);
The second line would wish to be realigned.
Otherwise
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> /* Big Hammer, we also need to ensure that any pending
> --
> 2.16.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] drm/i915: Enable display workaround 827 for all planes.
2018-04-09 12:46 ` [PATCH 4/4] drm/i915: Enable display workaround 827 for all planes Maarten Lankhorst
@ 2018-04-09 13:11 ` Ville Syrjälä
0 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjälä @ 2018-04-09 13:11 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
On Mon, Apr 09, 2018 at 02:46:56PM +0200, Maarten Lankhorst wrote:
> The workaround was applied only to the primary plane, but is required
> on all planes. Iterate over all planes in the crtc atomic check to see
> if the workaround is enabled, and only perform the actual toggling in
> the pre/post plane update functions.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 40 +++++++++++++++++++++---------------
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> 2 files changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 487a6e235222..829b593a3cee 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5162,7 +5162,6 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
> if (old_primary_state) {
> struct drm_plane_state *new_primary_state =
> drm_atomic_get_new_plane_state(old_state, primary);
> - struct drm_framebuffer *fb = new_primary_state->fb;
>
> intel_fbc_post_update(crtc);
>
> @@ -5170,15 +5169,11 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
> (needs_modeset(&pipe_config->base) ||
> !old_primary_state->visible))
> intel_post_enable_primary(&crtc->base, pipe_config);
> -
> - /* Display WA 827 */
> - if ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
> - IS_CANNONLAKE(dev_priv)) {
> - if (fb && fb->format->format == DRM_FORMAT_NV12)
> - skl_wa_clkgate(dev_priv, crtc->pipe, false);
> - }
> -
> }
> +
> + /* Display WA 827 */
> + if (old_crtc_state->nv12_wa && !pipe_config->nv12_wa)
> + skl_wa_clkgate(dev_priv, crtc->pipe, false);
> }
>
> static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
> @@ -5202,14 +5197,6 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
> struct intel_plane_state *new_primary_state =
> intel_atomic_get_new_plane_state(old_intel_state,
> to_intel_plane(primary));
> - struct drm_framebuffer *fb = new_primary_state->base.fb;
> -
> - /* Display WA 827 */
> - if ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
> - IS_CANNONLAKE(dev_priv)) {
> - if (fb && fb->format->format == DRM_FORMAT_NV12)
> - skl_wa_clkgate(dev_priv, crtc->pipe, true);
> - }
>
> intel_fbc_pre_update(crtc, pipe_config, new_primary_state);
> /*
> @@ -5221,6 +5208,10 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
> intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, false);
> }
>
> + /* Display WA 827 */
> + if (!old_crtc_state->nv12_wa && pipe_config->nv12_wa)
> + skl_wa_clkgate(dev_priv, crtc->pipe, true);
> +
> /*
> * Vblank time updates from the shadow to live plane control register
> * are blocked if the memory self-refresh mode is active at that
> @@ -10485,6 +10476,21 @@ static int intel_crtc_atomic_check(struct drm_crtc *crtc,
> return ret;
> }
>
> + pipe_config->nv12_wa = false;
> +
> + /* Apply display WA 827 if required. */
> + if (crtc_state->active &&
> + ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
> + IS_CANNONLAKE(dev_priv))) {
GLK doesn't need this? That seems odd to say the least.
> + struct drm_plane *plane;
> + const struct drm_plane_state *plane_state;
> +
> + drm_atomic_crtc_state_for_each_plane_state(plane, plane_state, crtc_state)
I'd prefer a bitmask instead of that sneaky peeking of the plane states.
It should also avoid polluting this sort of central/generic piece of
code with platform specific w/as.
> + if (plane_state->fb &&
> + plane_state->fb->format->format == DRM_FORMAT_NV12)
> + pipe_config->nv12_wa = true;
> + }
> +
> if (crtc_state->color_mgmt_changed) {
> ret = intel_color_check(crtc, crtc_state);
> if (ret)
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 9969309132d0..9c2b7f78d5dd 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -723,6 +723,7 @@ struct intel_crtc_state {
> bool update_wm_pre, update_wm_post; /* watermarks are updated */
> bool fb_changed; /* fb on any of the planes is changed */
> bool fifo_changed; /* FIFO split is changed */
> + bool nv12_wa; /* Whether display WA 827 needs to be enabled. */
>
> /* Pipe source size (ie. panel fitter input size)
> * All planes will be positioned inside this space,
> --
> 2.16.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
2018-04-09 12:46 [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Maarten Lankhorst
` (3 preceding siblings ...)
2018-04-09 12:57 ` [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Ville Syrjälä
@ 2018-04-09 14:01 ` Patchwork
2018-04-09 14:16 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-09 17:30 ` ✓ Fi.CI.IGT: " Patchwork
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-04-09 14:01 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
URL : https://patchwork.freedesktop.org/series/41370/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
591b58b45998 drm/i915: Change use get_new_plane_state instead of existing plane state
2c8e55a34368 drm/i915: Remove get_existing_crtc_state
78e0056cb594 drm/i915: Remove last references to drm_atomic_get_existing* macros
-:142: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#142: FILE: drivers/gpu/drm/i915/intel_display.c:12795:
+ drm_atomic_get_new_crtc_state(new_state->state,
plane->state->crtc);
total: 0 errors, 0 warnings, 1 checks, 115 lines checked
90d0615ca37a drm/i915: Enable display workaround 827 for all planes.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/4] drm/i915: Remove last references to drm_atomic_get_existing* macros
2018-04-09 13:04 ` Ville Syrjälä
@ 2018-04-09 14:04 ` Maarten Lankhorst
0 siblings, 0 replies; 12+ messages in thread
From: Maarten Lankhorst @ 2018-04-09 14:04 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
Op 09-04-18 om 15:04 schreef Ville Syrjälä:
> On Mon, Apr 09, 2018 at 02:46:55PM +0200, Maarten Lankhorst wrote:
>> All the references to get_existing_state can be converted to
>> get_new_state or get_old_state, which means that i915 is now
>> get_existing_state free.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_display.c | 51 ++++++++++++++++--------------------
>> 1 file changed, 23 insertions(+), 28 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index d42b635c6807..487a6e235222 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -5148,8 +5148,8 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
>> intel_atomic_get_new_crtc_state(to_intel_atomic_state(old_state),
>> crtc);
>> struct drm_plane *primary = crtc->base.primary;
>> - struct drm_plane_state *old_pri_state =
>> - drm_atomic_get_existing_plane_state(old_state, primary);
>> + struct drm_plane_state *old_primary_state =
>> + drm_atomic_get_old_plane_state(old_state, primary);
>>
>> intel_frontbuffer_flip(to_i915(crtc->base.dev), pipe_config->fb_bits);
>>
>> @@ -5159,19 +5159,16 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
>> if (hsw_post_update_enable_ips(old_crtc_state, pipe_config))
>> hsw_enable_ips(pipe_config);
>>
>> - if (old_pri_state) {
>> - struct intel_plane_state *primary_state =
>> - intel_atomic_get_new_plane_state(to_intel_atomic_state(old_state),
>> - to_intel_plane(primary));
>> - struct intel_plane_state *old_primary_state =
>> - to_intel_plane_state(old_pri_state);
>> - struct drm_framebuffer *fb = primary_state->base.fb;
>> + if (old_primary_state) {
>> + struct drm_plane_state *new_primary_state =
>> + drm_atomic_get_new_plane_state(old_state, primary);
>> + struct drm_framebuffer *fb = new_primary_state->fb;
>>
>> intel_fbc_post_update(crtc);
>>
>> - if (primary_state->base.visible &&
>> + if (new_primary_state->visible &&
>> (needs_modeset(&pipe_config->base) ||
>> - !old_primary_state->base.visible))
>> + !old_primary_state->visible))
>> intel_post_enable_primary(&crtc->base, pipe_config);
>>
>> /* Display WA 827 */
>> @@ -5192,8 +5189,8 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
>> struct drm_i915_private *dev_priv = to_i915(dev);
>> struct drm_atomic_state *old_state = old_crtc_state->base.state;
>> struct drm_plane *primary = crtc->base.primary;
>> - struct drm_plane_state *old_pri_state =
>> - drm_atomic_get_existing_plane_state(old_state, primary);
>> + struct drm_plane_state *old_primary_state =
>> + drm_atomic_get_old_plane_state(old_state, primary);
>> bool modeset = needs_modeset(&pipe_config->base);
>> struct intel_atomic_state *old_intel_state =
>> to_intel_atomic_state(old_state);
>> @@ -5201,13 +5198,11 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
>> if (hsw_pre_update_disable_ips(old_crtc_state, pipe_config))
>> hsw_disable_ips(old_crtc_state);
>>
>> - if (old_pri_state) {
>> - struct intel_plane_state *primary_state =
>> + if (old_primary_state) {
>> + struct intel_plane_state *new_primary_state =
>> intel_atomic_get_new_plane_state(old_intel_state,
>> to_intel_plane(primary));
>> - struct intel_plane_state *old_primary_state =
>> - to_intel_plane_state(old_pri_state);
>> - struct drm_framebuffer *fb = primary_state->base.fb;
>> + struct drm_framebuffer *fb = new_primary_state->base.fb;
>>
>> /* Display WA 827 */
>> if ((INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)) ||
>> @@ -5216,13 +5211,13 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
>> skl_wa_clkgate(dev_priv, crtc->pipe, true);
>> }
>>
>> - intel_fbc_pre_update(crtc, pipe_config, primary_state);
>> + intel_fbc_pre_update(crtc, pipe_config, new_primary_state);
>> /*
>> * Gen2 reports pipe underruns whenever all planes are disabled.
>> * So disable underrun reporting before all the planes get disabled.
>> */
>> - if (IS_GEN2(dev_priv) && old_primary_state->base.visible &&
>> - (modeset || !primary_state->base.visible))
>> + if (IS_GEN2(dev_priv) && old_primary_state->visible &&
>> + (modeset || !new_primary_state->base.visible))
>> intel_set_cpu_fifo_underrun_reporting(dev_priv, crtc->pipe, false);
>> }
>>
>> @@ -10836,7 +10831,7 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)
>> struct drm_connector_state *connector_state;
>> struct intel_encoder *encoder;
>>
>> - connector_state = drm_atomic_get_existing_connector_state(state, connector);
>> + connector_state = drm_atomic_get_new_connector_state(state, connector);
>> if (!connector_state)
>> connector_state = connector->state;
>>
>> @@ -12199,6 +12194,9 @@ static void intel_update_crtc(struct drm_crtc *crtc,
>> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
>> struct intel_crtc_state *pipe_config = to_intel_crtc_state(new_crtc_state);
>> bool modeset = needs_modeset(new_crtc_state);
>> + struct intel_plane_state *new_plane_state =
>> + intel_atomic_get_new_plane_state(to_intel_atomic_state(state),
>> + to_intel_plane(crtc->primary));
>>
>> if (modeset) {
>> update_scanline_offset(intel_crtc);
>> @@ -12211,11 +12209,8 @@ static void intel_update_crtc(struct drm_crtc *crtc,
>> pipe_config);
>> }
>>
>> - if (drm_atomic_get_existing_plane_state(state, crtc->primary)) {
>> - intel_fbc_enable(
>> - intel_crtc, pipe_config,
>> - to_intel_plane_state(crtc->primary->state));
>> - }
>> + if (new_plane_state)
>> + intel_fbc_enable(intel_crtc, pipe_config, new_plane_state);
>>
>> drm_atomic_helper_commit_planes_on_crtc(old_crtc_state);
>> }
>> @@ -12796,7 +12791,7 @@ intel_prepare_plane_fb(struct drm_plane *plane,
>>
>> if (old_obj) {
>> struct drm_crtc_state *crtc_state =
>> - drm_atomic_get_existing_crtc_state(new_state->state,
>> + drm_atomic_get_new_crtc_state(new_state->state,
>> plane->state->crtc);
> The second line would wish to be realigned.
>
> Otherwise
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thanks, pushed up to here. Will resend the workaround patch.
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
2018-04-09 12:46 [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Maarten Lankhorst
` (4 preceding siblings ...)
2018-04-09 14:01 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork
@ 2018-04-09 14:16 ` Patchwork
2018-04-09 17:30 ` ✓ Fi.CI.IGT: " Patchwork
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-04-09 14:16 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
URL : https://patchwork.freedesktop.org/series/41370/
State : success
== Summary ==
Series 41370v1 series starting with [1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
https://patchwork.freedesktop.org/api/1.0/series/41370/revisions/1/mbox/
---- Known issues:
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
pass -> DMESG-WARN (fi-cnl-y3) fdo#104951
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:430s
fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:449s
fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:382s
fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:543s
fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:297s
fi-bxt-dsi total:285 pass:255 dwarn:0 dfail:0 fail:0 skip:30 time:516s
fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:519s
fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:520s
fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:514s
fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:414s
fi-cfl-s3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:561s
fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:511s
fi-cnl-y3 total:285 pass:258 dwarn:1 dfail:0 fail:0 skip:26 time:580s
fi-elk-e7500 total:285 pass:226 dwarn:0 dfail:0 fail:0 skip:59 time:424s
fi-gdg-551 total:285 pass:177 dwarn:0 dfail:0 fail:0 skip:108 time:316s
fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:544s
fi-glk-j4005 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:483s
fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:410s
fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:423s
fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:469s
fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:434s
fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:472s
fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:466s
fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:508s
fi-pnv-d510 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:671s
fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:439s
fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:542s
fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:508s
fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:501s
fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:428s
fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:446s
fi-snb-2520m total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:590s
fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:399s
e5a01dd0c5d224beec064e40184cc63a82ae79ce drm-tip: 2018y-04m-09d-12h-37m-09s UTC integration manifest
90d0615ca37a drm/i915: Enable display workaround 827 for all planes.
78e0056cb594 drm/i915: Remove last references to drm_atomic_get_existing* macros
2c8e55a34368 drm/i915: Remove get_existing_crtc_state
591b58b45998 drm/i915: Change use get_new_plane_state instead of existing plane state
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8643/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
2018-04-09 12:46 [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Maarten Lankhorst
` (5 preceding siblings ...)
2018-04-09 14:16 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-04-09 17:30 ` Patchwork
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-04-09 17:30 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/4] drm/i915: Change use get_new_plane_state instead of existing plane state
URL : https://patchwork.freedesktop.org/series/41370/
State : success
== Summary ==
---- Known issues:
Test kms_flip:
Subgroup flip-vs-absolute-wf_vblank:
pass -> FAIL (shard-hsw) fdo#100368
Subgroup flip-vs-expired-vblank:
pass -> FAIL (shard-hsw) fdo#102887
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
shard-apl total:2680 pass:1835 dwarn:1 dfail:0 fail:7 skip:836 time:12644s
shard-hsw total:2680 pass:1783 dwarn:1 dfail:0 fail:4 skip:891 time:11369s
Blacklisted hosts:
shard-kbl total:2680 pass:1964 dwarn:1 dfail:0 fail:6 skip:709 time:9202s
shard-snb total:2680 pass:1366 dwarn:1 dfail:0 fail:10 skip:1303 time:6924s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8643/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-04-09 17:30 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-09 12:46 [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Maarten Lankhorst
2018-04-09 12:46 ` [PATCH 2/4] drm/i915: Remove get_existing_crtc_state Maarten Lankhorst
2018-04-09 12:57 ` Ville Syrjälä
2018-04-09 12:46 ` [PATCH 3/4] drm/i915: Remove last references to drm_atomic_get_existing* macros Maarten Lankhorst
2018-04-09 13:04 ` Ville Syrjälä
2018-04-09 14:04 ` Maarten Lankhorst
2018-04-09 12:46 ` [PATCH 4/4] drm/i915: Enable display workaround 827 for all planes Maarten Lankhorst
2018-04-09 13:11 ` Ville Syrjälä
2018-04-09 12:57 ` [PATCH 1/4] drm/i915: Change use get_new_plane_state instead of existing plane state Ville Syrjälä
2018-04-09 14:01 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork
2018-04-09 14:16 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-09 17:30 ` ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.