Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Siluvery, Arun" <arun.siluvery@linux.intel.com>
To: "Daniel, Thomas" <thomas.daniel@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Free resources correctly if we cannot	map status page during ctx create
Date: Mon, 17 Nov 2014 15:57:48 +0000	[thread overview]
Message-ID: <546A1AFC.7050206@linux.intel.com> (raw)
In-Reply-To: <BFEE8FEC12424048AF1805991D65FA91196EB412@IRSMSX105.ger.corp.intel.com>

On 17/11/2014 15:54, Daniel, Thomas wrote:
>> -----Original Message-----
>
>> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf
>
>> Of Arun Siluvery
>
>> Sent: Monday, November 17, 2014 3:48 PM
>
>> To: intel-gfx@lists.freedesktop.org
>
>> Subject: [Intel-gfx] [PATCH] drm/i915: Free resources correctly if we cannot
>
>> map status page during ctx create
>
>>
>
>> We are not freeing memory allocated for ringbuf and ctx if we fail to map
>
>> status page so release all resources correctly.
>
>>
>
>> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com<mailto:arun.siluvery@linux.intel.com>>
>
>> ---
>
>>   drivers/gpu/drm/i915/intel_lrc.c | 6 ++++--
>
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>
>>
>
>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c
>
>> b/drivers/gpu/drm/i915/intel_lrc.c
>
>> index f3efdbd..a84d24b 100644
>
>> --- a/drivers/gpu/drm/i915/intel_lrc.c
>
>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
>
>> @@ -1777,8 +1777,10 @@ int intel_lr_context_deferred_create(struct
>
>> intel_context *ctx,
>
>>                              ring->status_page.gfx_addr =
>
>> i915_gem_obj_ggtt_offset(ctx_obj);
>
>>                              ring->status_page.page_addr =
>
>>                                                              kmap(sg_page(ctx_obj->pages->sgl));
>
>> -                           if (ring->status_page.page_addr == NULL)
>
>> -                                           return -ENOMEM;
>
>> +                          if (ring->status_page.page_addr == NULL) {
>
>> +                                          ret = -ENOMEM;
>
>> +                                          goto error;
>
>> +                          }
>
>>                              ring->status_page.obj = ctx_obj;
>
>>              }
>
>
>
>
>
> Hi Arun,
>
>
>
> I think your tree is out of date.  See this patch:
>
> http://patchwork.freedesktop.org/patch/35828/
>
>
>
> Cheers,
>
> Thomas.
>
>
You are right, I don't have latest changes.
This patch can be ignored.

regards
Arun

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-11-17 15:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 15:48 [PATCH] drm/i915: Free resources correctly if we cannot map status page during ctx create Arun Siluvery
2014-11-17 15:54 ` Daniel, Thomas
2014-11-17 15:57   ` Siluvery, Arun [this message]
2014-11-17 19:04 ` Daniel Vetter
2014-11-18  7:44   ` Chris Wilson
2014-11-18  8:05     ` Daniel Vetter
2014-11-18  8:10     ` [PATCH] drm/i915: Drop return value from lrc_setup_hardware_status_page Daniel Vetter
2014-11-18 15:31       ` [PATCH] drm/i915: Drop return value from shuang.he

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=546A1AFC.7050206@linux.intel.com \
    --to=arun.siluvery@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.daniel@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