All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Mohammed Khajapasha <mohammed.khajapasha@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset
Date: Thu, 16 Jul 2020 13:40:09 +0300	[thread overview]
Message-ID: <20200716104009.yaexvqjejdh7g4oq@ahiler-desk1.fi.intel.com> (raw)
In-Reply-To: <87tuy7zs2x.fsf@intel.com>

On Thu, Jul 16, 2020 at 01:12:38PM +0300, Jani Nikula wrote:
> On Wed, 15 Jul 2020, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> > In KMS & i915 there are two thing that are called pipe:
> 
> ...
> 
> > Is there any practical reason besides people wanting to have test
> > results for pipe-c corresponding to Intel's hardware understanding of
> > what pipe-c is?
> >
> > You may need to ELI5 that to me. I have very rudimentary understanding
> > of this area and only learned about the multiple meanings of "pipe"
> > while doing the review here :-)
> 
> Something I've been saying all along: If you call something a "pipe", it
> *must* mean Intel hardware pipe. If you call something "crtc index", it
> *must* mean the ABI crtc index. Don't mix the two. Don't implicitly
> convert between the two (i.e. you need explicit conversion using the
> IOCTL). Assume it's purely a coincidence that they've previously matched
> 1:1.

I am all for clarifying things up, but I am not very familiar with the
history of how we ended up here - that's why I am asking all those
questions.

What bothers me is that pipe already has multiple meanings, not only in IGT.

From https://www.keithp.com/blogs/DRM-lease-4/ :
"It has been kludged into supporting multiple CRTCs by taking bits from
the 'type' parameter to hold a 'pipe' number, which is the index in the
kernel into the array of CRTCs."

https://elixir.bootlin.com/linux/v5.7.8/source/drivers/gpu/drm/drm_vblank.c#L1658

So pipe = crtc index (or offset) in the array of CRTCs, not the hardware
concept of a pipe. It's not the IGT inventing this terminology, and
there is already a precedent where the mapping doesn't have to be 1:1
(DRM Lease).

> In this case, naming is everything, and proper naming leads to clarity
> of the concepts and implementation.

crtc_index is also not awfully clear as it's too easy to confuse it with
crtc_id.

https://gitlab.freedesktop.org/mesa/drm/-/blob/master/xf86drmMode.h#L272


I am fine with IGT:
 1. using crtc_id for crtc_id
 2. using crtc_offset for the offset of that CRTC in the drmModeRes.crtcs
 3. using pipe to describe the hardware context

And I think that this patch series gets us there.


But I am afraid that we will diverge too much form kernel's vocabulary
which won't help with the core of the confusion.

Do you happen to know how the CRTC/pipe situation looks like with other
vendors?

-- 
Cheers,
Arek
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-07-16 10:40 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-11 20:05 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 01/11] lib/igt_kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 02/11] lib/igt_kms: Add igt_require_pipe() function Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 03/11] tests/kms_cursor_legacy: Read crtc id for enable pipes Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 04/11] tests/kms_lease: Get pipe from crtc " Mohammed Khajapasha
2020-07-15 14:21   ` Arkadiusz Hiler
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 05/11] tests/kms_lease: Read crtc id for a valid pipe Mohammed Khajapasha
2020-07-15 14:19   ` Arkadiusz Hiler
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 06/11] lib/kms: Skip igt test cases for disabled display pipes Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 07/11] tests/kms: Skip kms test cases for disabled pipes Mohammed Khajapasha
2020-07-11 20:05 ` [igt-dev] [PATCH i-g-t 08/11] tests/kms_atomic_transition: Set modeset for enable pipes only Mohammed Khajapasha
2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 09/11] i915/gem_eio: Set modeset for enable pipes Mohammed Khajapasha
2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-15 14:50   ` Arkadiusz Hiler
2020-07-16 10:12     ` Jani Nikula
2020-07-16 10:40       ` Arkadiusz Hiler [this message]
2020-07-16 17:23     ` Khajapasha, Mohammed
2020-07-16 18:07       ` Khajapasha, Mohammed
2020-07-17 13:02   ` Arkadiusz Hiler
2020-07-17 15:43     ` Khajapasha, Mohammed
2020-07-20  9:44       ` Arkadiusz Hiler
2020-07-11 20:06 ` [igt-dev] [PATCH i-g-t 11/11] tests/kms: Use crtc offset to read vblank event for a pipe Mohammed Khajapasha
2020-07-11 20:41 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Add support for display with (rev7) Patchwork
2020-07-11 21:53 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-07-15 11:54 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-07-20 15:20 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-20 15:20 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-20 11:48 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-20 11:48 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-17 15:40 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-17 15:41 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-20  9:35   ` Arkadiusz Hiler
2020-07-11 18:04 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-11 18:04 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha
2020-07-06  4:40 [igt-dev] [PATCH i-g-t 00/11] lib/igt_kms: Add support for display with Mohammed Khajapasha
2020-07-06  4:40 ` [igt-dev] [PATCH i-g-t 10/11] lib/kms: Convert pipe id flags for a vblank using crtc offset Mohammed Khajapasha

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=20200716104009.yaexvqjejdh7g4oq@ahiler-desk1.fi.intel.com \
    --to=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=mohammed.khajapasha@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.