From: Naresh Kumar Kachhi <naresh.kumar.kachhi@intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
"Satyanantha, Rama Gopal M" <rama.gopal.m.satyanantha@intel.com>
Subject: Re: [RFC 6/6] FOR_UPSTREAM [VPG]: drm/i915: call init_runtime_pm before gem_init
Date: Fri, 24 Jan 2014 20:41:21 +0530 [thread overview]
Message-ID: <52E28299.4020002@intel.com> (raw)
In-Reply-To: <CA+gsUGR3K-rzsCGgsfffy=VOBUcakSKbenkKmLkB1YECrjdbJw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2680 bytes --]
On 01/22/2014 07:14 PM, Paulo Zanoni wrote:
> 2014/1/22<naresh.kumar.kachhi@intel.com>:
>> From: Naresh Kumar Kachhi<naresh.kumar.kachhi@intel.com>
>>
>> with current code intel_runtime_pm_gpu_idle is getting called
>> even before runtime_pm is initialized. Moving runtime_pm_init
>> before i915_gem_init
>>
>> Following is the call stack, note: by this time
>> runtime_pm was not initialized
>>
>> intel_runtime_pm_gpu_idle+0x37/0x90
>> i915_gem_retire_requests+0x8d/0xa0
>> i915_gem_init_seqno+0x48/0x90
>> i915_gem_set_seqno+0x2a/0x70
>> i915_gem_init_hw+0x19c/0x300
>> ?
>> i915_gem_context_init+0x123/0x220
>> i915_gem_init+0x57/0x1a0
>> i915_driver_load+0xbf4/0xd50
> And why exactly is this a problem? Delaying intel_init_runtime_pm is a
> nice thing because we don't want our driver trying to runtime suspend
> while it's still being loaded.
pm.gpu_idle will be false (dev_priv is zeroed) until the init_runtime_pm is called.
In the call stack mentioned above we might see a call to intel_runtime_pm_gpu_idle.
If runtime pm is not initialized by now, pm.gpu_idle will be false and we will do a
runtime_put, without a matching runtime_get.
However in you patch
http://lists.freedesktop.org/archives/intel-gfx/2013-December/037729.html, i saw
you have moved the initializing gpu_idle in intel_pm_setup, which will fix this problem.
We will not need this patch with your new patches.
only concern in this patch is that we are scattering the pm initialization across two
function (runtime_pm_init and pm_setup).
>> Signed-off-by: Naresh Kumar Kachhi<naresh.kumar.kachhi@intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_dma.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
>> index b5af745..85162da 100644
>> --- a/drivers/gpu/drm/i915/i915_dma.c
>> +++ b/drivers/gpu/drm/i915/i915_dma.c
>> @@ -1511,6 +1511,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>> mutex_init(&dev_priv->dpio_lock);
>> mutex_init(&dev_priv->modeset_restore_lock);
>>
>> + intel_init_runtime_pm(dev_priv);
>> +
>> intel_pm_setup(dev);
>>
>> intel_display_crc_init(dev);
>> @@ -1674,8 +1676,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
>> if (IS_GEN5(dev))
>> intel_gpu_ips_init(dev_priv);
>>
>> - intel_init_runtime_pm(dev_priv);
>> -
>> return 0;
>>
>> out_power_well:
>> --
>> 1.8.1.2
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
[-- Attachment #1.2: Type: text/html, Size: 3894 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2014-01-24 15:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 12:04 [RFC 0/6] enabling runtime on BYT naresh.kumar.kachhi
2014-01-22 12:04 ` [RFC 1/6] drm/i915: cover ioctls with runtime_get/put naresh.kumar.kachhi
2014-01-22 12:51 ` Daniel Vetter
2014-01-22 13:23 ` Imre Deak
2014-01-24 15:05 ` Naresh Kumar Kachhi
2014-01-24 15:56 ` Paulo Zanoni
2014-02-24 5:17 ` Naresh Kumar Kachhi
2014-01-24 17:23 ` Imre Deak
2014-02-21 20:07 ` Jesse Barnes
2014-02-24 5:30 ` Naresh Kumar Kachhi
2014-01-22 13:35 ` Paulo Zanoni
2014-01-22 12:04 ` [RFC 2/6] drm/i915: cover ring access with rpm get/put naresh.kumar.kachhi
2014-01-22 13:39 ` Paulo Zanoni
2014-01-22 12:04 ` [RFC 3/6] drm/i915: introduce runtime get/put based on display activity naresh.kumar.kachhi
2014-01-22 13:40 ` Paulo Zanoni
2014-02-24 5:21 ` Naresh Kumar Kachhi
2014-01-22 12:04 ` [RFC 4/6] drm/i915/vlv: call runtime get/put based on disp activity naresh.kumar.kachhi
2014-01-22 12:04 ` [RFC 5/6] drm/i915: device specific runtime suspend/resume naresh.kumar.kachhi
2014-01-22 12:58 ` Daniel Vetter
2014-01-24 15:23 ` Naresh Kumar Kachhi
2014-01-22 12:04 ` [RFC 6/6] FOR_UPSTREAM [VPG]: drm/i915: call init_runtime_pm before gem_init naresh.kumar.kachhi
2014-01-22 13:44 ` Paulo Zanoni
2014-01-24 15:11 ` Naresh Kumar Kachhi [this message]
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=52E28299.4020002@intel.com \
--to=naresh.kumar.kachhi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=przanoni@gmail.com \
--cc=rama.gopal.m.satyanantha@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