All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/i915: Rename i915_load_modeset_init() to i915_modeset_load()
Date: Mon, 4 Mar 2019 08:06:09 -0800	[thread overview]
Message-ID: <20190304160609.xymjzo6n3zdpa7qn@ldmartin-desk.amr.corp.intel.com> (raw)
In-Reply-To: <871s3moqef.fsf@intel.com>

On Mon, Mar 04, 2019 at 01:00:40PM +0200, Jani Nikula wrote:
>On Fri, 01 Mar 2019, José Roberto de Souza <jose.souza@intel.com> wrote:
>> i915_load_modeset_init() sounds horrible also lets rename it so
>> the future cleanup function of it can be easially recognized.
>
>We load the driver, but init modeset. The name implies modeset init at
>driver load.
>
>The modeset load/unload sounds a bit odd to me. Even more so with
>begin/finish load and begin unload. It's not obvious to me what those
>should do. They're not a pattern we have.
>
>I'm not all that averse to renaming stuff in general, but any rename
>increases the cognitive burden for a while, and should make things
>*easier* to understand. I don't think that's the case in this series.
>
>I can understand i915_load_modeset_init sounding funny. If you insist on
>renaming, I'd go with i915_driver_modeset_init. It's in line with the
>rest of the functions.
>
>Here are my suggestions for the names:
>
>i915_modeset_load/i915_modeset_begin_load
>-> i915_driver_modeset_init
>
>i915_modeset_unload/i915_modeset_begin_unload
>-> i915_driver_modeset_cleanup or _fini
>
>i915_modeset_finish_load
>-> i915_driver_modeset_init_late

+1 for the name suggestions

Lucas De Marchi

>
>
>BR,
>Jani.
>
>
>>
>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_drv.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
>> index c08abdef5eb6..90c77fab3d70 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.c
>> +++ b/drivers/gpu/drm/i915/i915_drv.c
>> @@ -639,7 +639,7 @@ static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {
>>  	.can_switch = i915_switcheroo_can_switch,
>>  };
>>
>> -static int i915_load_modeset_init(struct drm_device *dev)
>> +static int i915_modeset_load(struct drm_device *dev)
>>  {
>>  	struct drm_i915_private *dev_priv = to_i915(dev);
>>  	struct pci_dev *pdev = dev_priv->drm.pdev;
>> @@ -1748,7 +1748,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
>>  	if (ret < 0)
>>  		goto out_cleanup_mmio;
>>
>> -	ret = i915_load_modeset_init(&dev_priv->drm);
>> +	ret = i915_modeset_load(&dev_priv->drm);
>>  	if (ret < 0)
>>  		goto out_cleanup_hw;
>
>-- 
>Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-04 16:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02  0:49 [PATCH 1/5] drm/i915/vlv: Move czclk to intel_pm José Roberto de Souza
2019-03-02  0:49 ` [PATCH 2/5] drm/i915: Rename i915_load_modeset_init() to i915_modeset_load() José Roberto de Souza
2019-03-04 11:00   ` Jani Nikula
2019-03-04 16:06     ` Lucas De Marchi [this message]
2019-03-02  0:49 ` [PATCH 3/5] drm/i915: Add a cleanup function for i915_modeset_load() José Roberto de Souza
2019-03-02  0:49 ` [PATCH 4/5] drm/i915: Move rawclck, power_domain and irq un/initialization from modeset functions José Roberto de Souza
2019-03-04 17:34   ` Ville Syrjälä
2019-03-05 11:42     ` Jani Nikula
2019-03-02  0:49 ` [PATCH 5/5] drm/i915: Extract gem_init() from modeset_load() José Roberto de Souza
2019-03-02  2:37 ` ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915/vlv: Move czclk to intel_pm Patchwork
2019-03-02 11:28 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-03-04 16:57 ` [PATCH 1/5] " Ville Syrjälä
2019-03-04 17:02   ` Ville Syrjälä

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=20190304160609.xymjzo6n3zdpa7qn@ldmartin-desk.amr.corp.intel.com \
    --to=lucas.demarchi@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.