From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: jani.nikula@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [RFC 3/6] drm/i915: Fix wrongly populated plane possible_crtcs bit mask
Date: Thu, 23 Jan 2020 15:47:48 +0200 [thread overview]
Message-ID: <20200123134748.GM13686@intel.com> (raw)
In-Reply-To: <20200123132659.725-4-anshuman.gupta@intel.com>
On Thu, Jan 23, 2020 at 06:56:56PM +0530, Anshuman Gupta wrote:
> As a disabled pipe in pipe_mask is not having a valid intel crtc,
> driver wrongly populates the possible_crtcs mask while initializing
> the plane for a CRTC. Fixing up the plane possible_crtc mask.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 23 ++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index afd8d43160c6..b250b31f6000 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -16407,6 +16407,28 @@ static void intel_crtc_free(struct intel_crtc *crtc)
> kfree(crtc);
> }
>
> +static void intel_plane_possible_crtc_fixup(struct drm_i915_private *dev_priv)
> +{
> + struct intel_crtc *crtc;
> + struct intel_plane *plane;
> +
> + /*
> + * if in case the disabled fused pipe is not the last pipe,
> + * it requires to fix the wrong populated possible_crtcs mask.
> + */
> + if (is_power_of_2(INTEL_INFO(dev_priv)->pipe_mask + 1))
> + return;
I don't undestand what you're trying to do here. Looks totally
pointless.
> +
> + for_each_intel_crtc(&dev_priv->drm, crtc) {
> + for_each_intel_plane_on_crtc(&dev_priv->drm, crtc, plane) {
> + if (WARN_ON(!(plane->base.possible_crtcs & BIT(crtc->pipe))))
> + return;
Rather ugly abuse of possible_crtcs. I would remove the current
possible_crtcs assignments totally, and just do something simple like
for_each_intel_plane() {
crtc = crtc_for_pipe(plane->pipe);
plane->possible_crtcs = crtc_mask(&crtc->base);
}
> + plane->base.possible_crtcs =
> + drm_crtc_mask(&crtc->base);
> + }
> + }
> +}
> +
> static int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
> {
> struct intel_plane *primary, *cursor;
> @@ -17544,6 +17566,7 @@ int intel_modeset_init(struct drm_i915_private *i915)
> }
> }
>
> + intel_plane_possible_crtc_fixup(i915);
> intel_shared_dpll_init(dev);
> intel_update_fdi_pll_freq(i915);
>
> --
> 2.24.0
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-01-23 13:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 13:26 [Intel-gfx] [RFC 0/6] 3 display pipes combination system support Anshuman Gupta
2020-01-23 13:26 ` [Intel-gfx] [RFC 1/6] drm/i915: Iterate over pipe and skip the disabled one Anshuman Gupta
2020-01-23 13:48 ` Jani Nikula
2020-01-24 11:59 ` Anshuman Gupta
2020-01-24 12:15 ` Jani Nikula
2020-01-24 12:19 ` Anshuman Gupta
2020-01-24 13:34 ` Jani Nikula
2020-01-23 13:26 ` [Intel-gfx] [RFC 2/6] drm/i915: Remove (pipe == crtc->index) asummption Anshuman Gupta
2020-01-23 13:40 ` Ville Syrjälä
2020-01-30 12:02 ` Anshuman Gupta
2020-01-30 13:35 ` Ville Syrjälä
2020-01-30 15:27 ` Ville Syrjälä
2020-01-23 13:49 ` Jani Nikula
2020-01-23 13:26 ` [Intel-gfx] [RFC 3/6] drm/i915: Fix wrongly populated plane possible_crtcs bit mask Anshuman Gupta
2020-01-23 13:47 ` Ville Syrjälä [this message]
2020-01-23 13:26 ` [Intel-gfx] [RFC 4/6] drm/i915: Get right max plane stride Anshuman Gupta
2020-01-23 13:50 ` Ville Syrjälä
2020-01-23 13:26 ` [Intel-gfx] [RFC 5/6] drm/i915: Add WARN_ON in intel_get_crtc_for_pipe() Anshuman Gupta
2020-01-23 13:52 ` Ville Syrjälä
2020-01-23 13:26 ` [Intel-gfx] [RFC 6/6] drm/i915: Enable 3 display pipes support Anshuman Gupta
2020-01-23 13:53 ` Ville Syrjälä
2020-01-23 21:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for 3 display pipes combination system support Patchwork
2020-01-23 22:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-25 13:08 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200123134748.GM13686@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.