From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 6/6] drm/i915/dp: Sanitize link common rate array lookups
Date: Wed, 20 Oct 2021 13:09:36 +0300 [thread overview]
Message-ID: <YW/q4HXo7q/aceOj@intel.com> (raw)
In-Reply-To: <87r1cgnhsf.fsf@intel.com>
On Wed, Oct 20, 2021 at 12:53:52PM +0300, Jani Nikula wrote:
> On Wed, 20 Oct 2021, Imre Deak <imre.deak@intel.com> wrote:
> > On Tue, Oct 19, 2021 at 10:23:14PM +0300, Jani Nikula wrote:
> >> On Mon, 18 Oct 2021, Imre Deak <imre.deak@intel.com> wrote:
> >> > Add an assert that lookups from the intel_dp->common_rates[] array
> >> > are always valid.
> >>
> >> The one thought I had here was that if we're adding helper functions for
> >> accessing common rates, they should probably be of the form "this is the
> >> rate I have now, give me a slower rate" instead of making the index part
> >> of the interface. The index doesn't really mean anything, and if we want
> >> to avoid overflows, it should be hidden from the interfaces.
> >
> > intel_dp_rate_index() is also part of the interface, but I suppose it
> > could be improved.
>
> Most of its users could be converted to two functions:
>
> - is this a valid rate?
> - give me a slower rate
>
> The only place where index is actually needed is the eDP rate select
> method.
>
> Pretty much everywhere I'm starting to prefer passing the actual values
> instead of mappings.
I think I had an ancient patch along those lines...
I guess I'm thinking of this one:
https://patchwork.freedesktop.org/patch/101471/?series=10354&rev=3
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2021-10-20 10:10 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 9:41 [Intel-gfx] [PATCH 0/6] drm/i915/dp: Fix link parameter use in lack of a valid DPCD Imre Deak
2021-10-18 9:41 ` [Intel-gfx] [PATCH 1/6] drm/i915/dp: Skip the HW readout of DPCD on disabled encoders Imre Deak
2021-10-18 9:41 ` Imre Deak
2021-10-18 9:41 ` [Intel-gfx] [PATCH 2/6] drm/i915/dp: Ensure sink rate values are always valid Imre Deak
2021-10-18 9:41 ` Imre Deak
2021-10-18 14:34 ` [Intel-gfx] [PATCH v2 " Imre Deak
2021-10-18 14:34 ` Imre Deak
2021-10-19 7:27 ` [Intel-gfx] [PATCH " Jani Nikula
2021-10-19 7:33 ` Imre Deak
2021-10-19 7:37 ` Jani Nikula
2021-10-19 7:39 ` Imre Deak
2021-10-19 18:37 ` Imre Deak
2021-10-19 19:17 ` Jani Nikula
2021-10-18 9:41 ` [Intel-gfx] [PATCH 3/6] drm/i915/dp: Ensure max link params " Imre Deak
2021-10-18 9:41 ` Imre Deak
2021-10-18 9:41 ` [Intel-gfx] [PATCH 4/6] drm/i915/dp: Ensure sink/link max lane count values " Imre Deak
2021-10-18 15:04 ` Ville Syrjälä
2021-10-18 15:13 ` Imre Deak
2021-10-18 15:27 ` Ville Syrjälä
2021-10-18 9:41 ` [Intel-gfx] [PATCH 5/6] drm/i915/dp: Sanitize sink rate DPCD register values Imre Deak
2021-10-18 9:41 ` [Intel-gfx] [PATCH 6/6] drm/i915/dp: Sanitize link common rate array lookups Imre Deak
2021-10-19 19:23 ` Jani Nikula
2021-10-20 9:06 ` Imre Deak
2021-10-20 9:53 ` Jani Nikula
2021-10-20 10:09 ` Ville Syrjälä [this message]
2021-10-18 12:31 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp: Fix link parameter use in lack of a valid DPCD Patchwork
2021-10-18 12:33 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-10-18 13:06 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-10-18 18:01 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp: Fix link parameter use in lack of a valid DPCD (rev2) Patchwork
2021-10-18 18:03 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-10-18 18:31 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-19 0:52 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-10-19 12:54 ` Imre Deak
2021-10-19 15:33 ` Vudum, Lakshminarayana
2021-10-19 16:32 ` Imre Deak
2021-10-19 14:45 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2021-10-20 15:40 ` Imre Deak
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=YW/q4HXo7q/aceOj@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.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.