All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: dhinakaran.pandiyan@intel.com,
	vathsala nagaraju <vathsala.nagaraju@intel.com>,
	rodrigo.vivi@intel.com, intel-gfx@lists.freedesktop.org
Cc: Puthikorn Voravootivat <puthik@chromium.org>,
	Maulik V Vaghela <maulik.v.vaghela@intel.com>
Subject: Re: [PATCH] drm/i915/psr: vbt change for psr
Date: Thu, 17 May 2018 11:02:58 +0300	[thread overview]
Message-ID: <87muwyzp3h.fsf@intel.com> (raw)
In-Reply-To: <1526492658.17473.134.camel@intel.com>

On Wed, 16 May 2018, Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> wrote:
> On Wed, 2018-05-16 at 11:08 +0300, Jani Nikula wrote:
>> I think the patch is now the way it should be. We should not change
>> our interpretation based on the value.
>
> Is it correct to infer, from your response, that VBT values are not
> always set based on hardware capability as documented in bspec?

Correct. I think it was the good intention of the VBT change to only
allow values that map to valid hardware values, but I think it has
caused much more trouble than it has helped.

First, the change was not universally tied to a VBT version, and I've
seen VBTs in the wild with version >= 209 that still use multiples of
100 us. (And the spec is still in contradiction with itself.)

Second, regardless of mapping or multiples of 100 us we need to verify
our input. Because I've seen VBTs in the wild that are bogus regardless
of how they're supposed to be interpreted.

Third, we already had the code in place to map multiples of 100 us to
hardware. We'll need to keep that practically forever. And now we need
to have *another* mapping.

Fourth, the multiples of 100 us does not require *any* spec change when
hardware changes to support different values. The new mapping requires
changes throughout the stack that looks at the values. (Basically I
object to any VBT specification that says anything platform
dependent. It should be generic.)

Now, the patch at hand uses the best guesses we can make to translate
whatever the VBT has to microseconds, in intel_bios.c. That part does
not care about hardware capability. For validity, it only looks at what
we think is according to VBT spec. It should be hardware agnostic,
except for the IS_GEN9_BC() thing, which should probably include gen10+
too.

The code in intel_psr.c gets the microseconds as input, and maps that to
hardware capability as best we can, erring towards longer delays.

Two different abstractions for two different things. One to abstract
VBT, another to abstract hardware. This is in line with the direction
I've tried to take intel_bios.c and VBT parsing and the VBT spec (the
little I've had influence for that) for the longest time. We must not
let the VBT abstractions to leak into the driver code.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-05-17  8:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14  3:32 [PATCH] drm/i915/psr: vbt change for psr vathsala nagaraju
2018-05-14  3:41 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/psr: vbt change for psr (rev7) Patchwork
2018-05-14  3:58 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-14  4:47 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-05-15 22:55 ` [PATCH] drm/i915/psr: vbt change for psr Puthikorn Voravootivat
2018-05-16  3:48   ` vathsala nagaraju
2018-05-15 23:03 ` Dhinakaran Pandiyan
2018-05-16  3:44   ` vathsala nagaraju
2018-05-16  8:08     ` Jani Nikula
2018-05-16 17:44       ` Dhinakaran Pandiyan
2018-05-17  8:02         ` Jani Nikula [this message]
2018-05-17 20:12           ` Dhinakaran Pandiyan
2018-05-16  8:13     ` Jani Nikula
2018-05-16 22:04     ` Dhinakaran Pandiyan
  -- strict thread matches above, loose matches on Subject: below --
2018-05-23  3:05 vathsala nagaraju
2018-05-23 10:03 ` Jani Nikula
2018-05-23 12:55   ` Nagaraju, Vathsala
2018-05-23 13:10     ` Jani Nikula
2018-05-22  9:27 vathsala nagaraju
2018-05-22 12:46 ` Jani Nikula
2018-05-24 13:04   ` Jani Nikula
2018-05-18  8:55 vathsala nagaraju
2018-05-18  9:31 ` Jani Nikula
2018-05-22  4:48   ` Nagaraju, Vathsala
2018-05-22  8:05     ` Jani Nikula
2018-05-22  8:36       ` Nagaraju, Vathsala
2018-05-03 11:36 vathsala nagaraju
2018-05-03 15:44 ` Rodrigo Vivi
2018-05-03 17:13   ` Nagaraju, Vathsala
2018-05-04 23:13     ` Puthikorn Voravootivat
2018-05-03  9:08 vathsala nagaraju
2018-05-03  9:39 ` Jani Nikula
2018-05-02  9:13 vathsala nagaraju
2018-05-02 21:15 ` Rodrigo Vivi
2018-05-03  3:21   ` vathsala nagaraju
2018-05-03  6:59   ` Jani Nikula
2018-05-03  7:07 ` Jani Nikula
2018-04-19  7:42 vathsala nagaraju
2018-04-19 13:35 ` Jani Nikula
2018-04-20  6:30   ` vathsala nagaraju
2018-04-27  7:52     ` Jani Nikula
2018-04-11 17:57 vathsala nagaraju
2018-04-12  9:26 ` Jani Nikula
2018-04-06 17:28 vathsala nagaraju
2018-04-06 17:41 ` Rodrigo Vivi
2018-04-09 13:57   ` Jani Nikula

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=87muwyzp3h.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maulik.v.vaghela@intel.com \
    --cc=puthik@chromium.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=vathsala.nagaraju@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.