Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Souza, Jose" <jose.souza@intel.com>,
	"De Marchi, Lucas" <lucas.demarchi@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Vivi,  Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [Intel-xe] [PATCH v3 1/6] drm/i915: Initialize dkl_phy spin lock from display code path
Date: Thu, 13 Apr 2023 11:22:31 +0300	[thread overview]
Message-ID: <87v8i0b394.fsf@intel.com> (raw)
In-Reply-To: <95fb452a03404f8c3ec5983e6cd88a49e342c695.camel@intel.com>

On Wed, 12 Apr 2023, "Souza, Jose" <jose.souza@intel.com> wrote:
> On Tue, 2023-04-11 at 14:20 -0700, Lucas De Marchi wrote:
>> On Tue, Apr 11, 2023 at 08:07:12PM +0000, Jose Souza wrote:
>> > On Tue, 2023-04-11 at 12:59 -0700, Lucas De Marchi wrote:
>> > > On Tue, Apr 11, 2023 at 10:51:04AM -0400, Rodrigo Vivi wrote:
>> > > > On Tue, Apr 11, 2023 at 12:14:36PM +0300, Jani Nikula wrote:
>> > > > > On Tue, 11 Apr 2023, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
>> > > > > > On Tue, Apr 11, 2023 at 11:51:33AM +0300, Jani Nikula wrote:
>> > > > > > > On Tue, 11 Apr 2023, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
>> > > > > > > > On Mon, Apr 10, 2023 at 11:32:14AM -0700, José Roberto de Souza wrote:
>> > > > > > > > > Start to move the initialization of some lock from
>> > > > > > > > > i915_driver_early_probe().
>> > > > > > > > > No dkl function is called prior to intel_setup_outputs(), so this is
>> > > > > > > > > a good place to initialize it.
>> > > > > > > > 
>> > > > > > > > I disagree. We don't want to sprinke these all over the place.
>> > > > > > > 
>> > > > > > > I'm thinking if only foo.c uses a lock, foo.c should initialize it, not
>> > > > > > > someone else.
>> > > > > > 
>> > > > > > Perhaps. But I think there should be some consistent place in the higher
>> > > > > > level code where all such things get called instead of dropping each one
>> > > > > > individually into some random spot in the overlall display init flow.
>> > > > > 
>> > > > > Agreed.
>> > > > 
>> > > > Ops, I just saw this now, right after I cc'ed you in the other thread.
>> > > > 
>> > > > So, probably good to hold this and do the entire refactor together of all
>> > > > those locks initialization so we find this common consistent place apparently...
>> > > 
>> > > "internal" sw initialization of display-related stuff. It doesn't belong in
>> > > i915_driver_early_probe(), it makes harder to follow the sequence if we sprinkle
>> > > them around, like here in intel_setup_outputs.
>> > > 
>> > > But I don't see why this couldn't be done in a higher level "sw
>> > > initialization of display-related stuff".  Should we add an equivalent
>> > > of i915_driver_early_probe(), e.g.  intel_display_early_probe()[1],  and
>> > > move the display-related things from i915_driver_early_probe()?
>> > > 
>> > > In that case, from xe we would call this function rather than
>> > > initializing these fields in xe_display_create()
>> > 
>> > Sent another version, added intel_display_locks_init() that is called in the beginning of intel_modeset_init_noirq().
>> > https://patchwork.freedesktop.org/series/116326/
>> 
>> modeset? why? That is after we are already probing the hw....
>
> That called during probe, called from i915_driver_probe().
>
>> and what does that have to do with modeset?
>
> The name is misleading but intel_modeset_init_noirq() is the first generic display initialization function called.
> There is other display functions called before it but they are very specific(intel_dram_detect(), intel_bw_init_hw() and
> intel_device_info_runtime_init()).

See [1].

BR,
Jani.


[1] https://lore.kernel.org/r/87ile1cjh8.fsf@intel.com

>
>> 
>> Lucas De Marchi
>> 
>> > 
>> > If this is accepted we can then move the other display locks from i915_driver_early_probe().
>> > 
>> > > 
>> > > Lucas De Marchi
>> > > 
>> > > [1] I don't like the name, but it follows what is already there
>> > > 
>> > > > 
>> > > > > 
>> > > > > --
>> > > > > Jani Nikula, Intel Open Source Graphics Center
>> > 
>

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-04-13  8:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 18:32 [Intel-gfx] [PATCH v3 1/6] drm/i915: Initialize dkl_phy spin lock from display code path José Roberto de Souza
2023-04-10 18:32 ` [Intel-gfx] [PATCH v3 2/6] drm/i915: Only initialize dlk phy lock in display 12 and newer José Roberto de Souza
2023-04-11  8:38   ` Ville Syrjälä
2023-04-11  8:32 ` [Intel-gfx] [Intel-xe] [PATCH v3 1/6] drm/i915: Initialize dkl_phy spin lock from display code path Jani Nikula
2023-04-11  8:33   ` Jani Nikula
2023-04-11 13:24     ` Souza, Jose
2023-04-11  8:39 ` [Intel-gfx] " Ville Syrjälä
2023-04-11  8:51   ` [Intel-gfx] [Intel-xe] " Jani Nikula
2023-04-11  9:12     ` Ville Syrjälä
2023-04-11  9:14       ` Jani Nikula
2023-04-11 14:51         ` Rodrigo Vivi
2023-04-11 19:59           ` Lucas De Marchi
2023-04-11 20:07             ` Souza, Jose
2023-04-11 21:20               ` Lucas De Marchi
2023-04-12 17:13                 ` Souza, Jose
2023-04-13  8:22                   ` Jani Nikula [this message]
2023-04-13  9:49                     ` 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=87v8i0b394.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox