Re: [PATCH] drm/i915: Make scaler_id check in check_crtc_state work for all gens

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
 

Gesendet: Dienstag, 12. Mai 2015 um 08:40 Uhr
Von: "Daniel Vetter" <daniel@xxxxxxxx>
An: "Chandra Konduru" <chandra.konduru@xxxxxxxxx>
Cc: daniel.vetter@xxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx
Betreff: Re:  [PATCH] drm/i915: Make scaler_id check in check_crtc_state work for all gens
On Mon, May 11, 2015 at 02:35:47PM -0700, Chandra Konduru wrote:
> During check_crtc_state, scaler_id mispatch is being reported for HSW.
> This is applicable for skl+ and not for HSW. It is introduced by
> commit id:
> commit a1b2278e4dfcd2dbea85e319ebf73a6b7b2f180b
> Author: Chandra Konduru <chandra.konduru@xxxxxxxxx>
> Date: Tue Apr 7 15:28:45 2015 -0700
>
> drm/i915: skylake panel fitting using shared scalers
>
> This patch will make sure that we leave scaler_id as 0 for platforms
> before skl and set for skl+ only. This way scaler_id check during
> check_crtc_state will pass for both prior to skl and skl+ platforms.
>
> v2:
> -Leave scaler_id as 0 for gen < 9 (Daniel)
>
> Signed-off-by: Chandra Konduru <chandra.konduru@xxxxxxxxx>
> References: http://lists.freedesktop.org/archives/intel-gfx/2015-May/065741.html

Queued for -next, thanks for the patch.
-Daniel

> ---
> drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index c297cdc..5c9f358 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9351,6 +9351,12 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,
> }
>
> pfit_domain = POWER_DOMAIN_PIPE_PANEL_FITTER(crtc->pipe);
> +
> + if (INTEL_INFO(dev)->gen >= 9) {
> + pipe_config->scaler_state.scaler_id = -1;
> + pipe_config->scaler_state.scaler_users &= ~(1 << SKL_CRTC_INDEX);
> + }
> +
> if (intel_display_power_is_enabled(dev_priv, pfit_domain)) {
> if (INTEL_INFO(dev)->gen == 9)
> skylake_get_pfit_config(crtc, pipe_config);
> @@ -9358,10 +9364,6 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,
> ironlake_get_pfit_config(crtc, pipe_config);
> else
> MISSING_CASE(INTEL_INFO(dev)->gen);
> -
> - } else {
> - pipe_config->scaler_state.scaler_id = -1;
> - pipe_config->scaler_state.scaler_users &= ~(1 << SKL_CRTC_INDEX);
> }
>
> if (IS_HASWELL(dev))
> @@ -13248,8 +13250,8 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
> primary->max_downscale = 1;
> if (INTEL_INFO(dev)->gen >= 9) {
> primary->can_scale = true;
> + state->scaler_id = -1;
> }
> - state->scaler_id = -1;
> primary->pipe = pipe;
> primary->plane = pipe;
> primary->check_plane = intel_check_primary_plane;
> @@ -13431,7 +13433,6 @@ static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
> cursor->max_downscale = 1;
> cursor->pipe = pipe;
> cursor->plane = pipe;
> - state->scaler_id = -1;
> cursor->check_plane = intel_check_cursor_plane;
> cursor->commit_plane = intel_commit_cursor_plane;
> cursor->disable_plane = intel_disable_cursor_plane;
> @@ -13454,6 +13455,9 @@ static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
> state->base.rotation);
> }
>
> + if (INTEL_INFO(dev)->gen >=9)
> + state->scaler_id = -1;
> +
> drm_plane_helper_add(&cursor->base, &intel_plane_helper_funcs);
>
> return &cursor->base;
> --
> 1.7.9.5


yeah the error message about mismatch in scaler_state.scaler_id is gone with this commit however intel_display is still broken:

[   35.159170] ------------[ cut here ]------------
[   35.159195] WARNING: CPU: 1 PID: 1314 at drivers/gpu/drm/i915/intel_display.c:12023 intel_modeset_check_state+0x208/0xb50 [i915]()
[   35.159197] active encoder's pipe doesn't match(expected 1, found 0)
[   35.159198] Modules linked in: snd_hda_codec_hdmi i915 fbcon bitblit snd_hda_codec_realtek cfbfillrect softcursor font cfbimgblt snd_hda_codec_generic intel_gtt cfbcopyarea drm_kms_helper drm snd_hda_intel fb iwlmvm fbdev snd_hda_codec snd_hwdep snd_hda_core snd_pcm iwlwifi
[   35.159222] CPU: 1 PID: 1314 Comm: X Not tainted 4.1.0-rc3+ #11
[   35.159223] Hardware name: LENOVO qqqqENX407/qqqqENX407, BIOS GLET77WW (2.31 ) 01/27/2015
[   35.159225]  0000000000000000 ffffffffa02df138 ffffffff8155c7ab ffff88040b097bc8
[   35.159229]  ffffffff810451b7 ffff88040bbf6400 ffff88040ba47000 0000000000000001
[   35.159232]  ffff88040ba47340 ffff88040ba47328 ffffffff81045235 ffffffffa02e2588
[   35.159235] Call Trace:
[   35.159243]  [<ffffffff8155c7ab>] ? dump_stack+0x40/0x50
[   35.159248]  [<ffffffff810451b7>] ? warn_slowpath_common+0x77/0xb0
[   35.159251]  [<ffffffff81045235>] ? warn_slowpath_fmt+0x45/0x50
[   35.159264]  [<ffffffffa027f308>] ? intel_modeset_check_state+0x208/0xb50 [i915]
[   35.159278]  [<ffffffffa0279dcb>] ? __intel_set_mode+0xa8b/0xcb0 [i915]
[   35.159291]  [<ffffffffa0280238>] ? intel_crtc_set_config+0x578/0x650 [i915]
[   35.159303]  [<ffffffffa01243d7>] ? drm_crtc_check_viewport+0x27/0xf0 [drm]
[   35.159312]  [<ffffffffa012505f>] ? drm_mode_set_config_internal+0x5f/0x100 [drm]
[   35.159321]  [<ffffffffa01299ca>] ? drm_mode_setcrtc+0x22a/0x5f0 [drm]
[   35.159328]  [<ffffffffa011be2a>] ? drm_ioctl+0x15a/0x580 [drm]
[   35.159333]  [<ffffffff81101268>] ? do_vfs_ioctl+0x2e8/0x4f0
[   35.159336]  [<ffffffff810f2138>] ? __sb_end_write+0x28/0x60
[   35.159341]  [<ffffffff810f0274>] ? vfs_write+0x154/0x180
[   35.159344]  [<ffffffff811014a6>] ? SyS_ioctl+0x36/0x80
[   35.159348]  [<ffffffff815637db>] ? system_call_fastpath+0x16/0x6e
[   35.159350] ---[ end trace 6fdc7b6ed4615ffc ]---


_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux