mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Sedat Dilek <sedat.dilek@gmail.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	DRI <dri-devel@lists.freedesktop.org>,
	linux-next <linux-next@vger.kernel.org>
Subject: Re: [Intel-gfx] linux-next: Tree for Jul 25 [ call-trace: drm | drm-intel related? ]
Date: Thu, 25 Jul 2013 19:55:27 +0200	[thread overview]
Message-ID: <CA+icZUXz+6MgbW952fU_da1-RfX8CSZp76gJnOwGDNsd-rdebA@mail.gmail.com> (raw)
In-Reply-To: <CA+icZUUpnQ_=bTtK-0-qG90GjV38oeVe2E1v-KdLZQFQWH21GQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3229 bytes --]

On Thu, Jul 25, 2013 at 7:52 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Thu, Jul 25, 2013 at 7:26 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> On Thu, Jul 25, 2013 at 07:15:03PM +0200, Sedat Dilek wrote:
>>> On Thu, Jul 25, 2013 at 7:01 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>>> > Basically boils down to either an object allocation failure or mmaping
>>> > failure. I think dmesg with drm.debug=7 is the next step.
>>>
>>> Attached! Thanks for taking care.
>>
>> Hmm, looks like i915_gem_map_gtt fails, but no reason given, so can you
>> please apply this for more debug:
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>> index 0563661..34e09bf 100644
>> --- a/drivers/gpu/drm/i915/i915_gem.c
>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>> @@ -1630,24 +1630,29 @@ i915_gem_mmap_gtt(struct drm_file *file,
>>
>>         obj = to_intel_bo(drm_gem_object_lookup(dev, file, handle));
>>         if (&obj->base == NULL) {
>> +               DRM_DRIVER_DEBUG("Unknown object handle %d\n", handle);
>>                 ret = -ENOENT;
>>                 goto unlock;
>>         }
>>
>>         if (obj->base.size > dev_priv->gtt.mappable_end) {
>> +               DRM_DRIVER_DEBUG("Object (%d) larger than mappable aperture (%d) > %d\n",
>> +                               (int)obj->base.size, (int)dev_priv->gtt.mappable_end);
>>                 ret = -E2BIG;
>>                 goto out;
>>         }
>>
>>         if (obj->madv != I915_MADV_WILLNEED) {
>> -               DRM_ERROR("Attempting to mmap a purgeable buffer\n");
>> +               DRM_DRIVER_DEBUG("Attempting to mmap a purgeable buffer\n");
>>                 ret = -EINVAL;
>>                 goto out;
>>         }
>>
>>         ret = i915_gem_object_create_mmap_offset(obj);
>> -       if (ret)
>> +       if (ret) {
>> +               DRM_DRIVER_DEBUG("Failed to allocate mmap offset (ret=%d)\n", ret);
>>                 goto out;
>> +       }
>>
>>         *offset = (u64)obj->base.map_list.hash.key << PAGE_SHIFT;
>>
>> --
>
> This does not apply... After refreshing and some cleanups... does not build:
>
> $ LANG=C LC_ALL=C make M=drivers/gpu/drm/i915
>   LD      drivers/gpu/drm/i915/built-in.o
>   CC [M]  drivers/gpu/drm/i915/i915_drv.o
>   CC [M]  drivers/gpu/drm/i915/i915_dma.o
>   CC [M]  drivers/gpu/drm/i915/i915_irq.o
>   CC [M]  drivers/gpu/drm/i915/i915_debugfs.o
>   CC [M]  drivers/gpu/drm/i915/i915_gpu_error.o
>   CC [M]  drivers/gpu/drm/i915/i915_suspend.o
>   CC [M]  drivers/gpu/drm/i915/i915_gem.o
> drivers/gpu/drm/i915/i915_gem.c: In function 'i915_gem_mmap_gtt':
> drivers/gpu/drm/i915/i915_gem.c:1538:3: error: implicit declaration of
> function 'DRM_DRIVER_DEBUG' [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> make[1]: *** [drivers/gpu/drm/i915/i915_gem.o] Error 1
> make: *** [_module_drivers/gpu/drm/i915] Error 2
>

F*ck. Wrong patch refreshed.

- S.

> - Sedat -
>
>> Chris Wilson, Intel Open Source Technology Centre
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-next" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: 0001-i915-Debug-test-patch-to-see-why-i915_gem_map_gtt-fa.patch --]
[-- Type: application/octet-stream, Size: 1608 bytes --]

From 7dc4b501732888cc916ad4effa3a1b6bdd2f4358 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu, 25 Jul 2013 19:40:58 +0200
Subject: [PATCH] i915: Debug test patch to see why i915_gem_map_gtt fails

[ dileks: v2:
  * Adapt to fit drm-intel-nightly pulled into next-20130725
  * s/DRM_DRIVER_DEBUG/DRM_DEBUG_DRIVER ]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 340d547..efb364e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1535,24 +1535,29 @@ i915_gem_mmap_gtt(struct drm_file *file,
 
 	obj = to_intel_bo(drm_gem_object_lookup(dev, file, handle));
 	if (&obj->base == NULL) {
+		DRM_DEBUG_DRIVER("Unknown object handle %d\n", handle);
 		ret = -ENOENT;
 		goto unlock;
 	}
 
 	if (obj->base.size > dev_priv->gtt.mappable_end) {
+		DRM_DEBUG_DRIVER("Object (%d) larger than mappable aperture (%d) > %d\n",
+				(int)obj->base.size, (int)dev_priv->gtt.mappable_end);
 		ret = -E2BIG;
 		goto out;
 	}
 
 	if (obj->madv != I915_MADV_WILLNEED) {
-		DRM_ERROR("Attempting to mmap a purgeable buffer\n");
+		DRM_DEBUG_DRIVER("Attempting to mmap a purgeable buffer\n");
 		ret = -EINVAL;
 		goto out;
 	}
 
 	ret = i915_gem_object_create_mmap_offset(obj);
-	if (ret)
+	if (ret) {
+		DRM_DEBUG_DRIVER("Failed to allocate mmap offset (ret=%d)\n", ret);
 		goto out;
+	}
 
 	*offset = drm_vma_node_offset_addr(&obj->base.vma_node);
 
-- 
1.8.3.4


  reply	other threads:[~2013-07-25 17:55 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25  8:54 Sedat Dilek
2013-07-25  9:44 ` [Intel-gfx] " Jani Nikula
2013-07-25 10:02   ` Sedat Dilek
2013-07-25 10:05     ` Sedat Dilek
2013-07-25 10:21       ` Jani Nikula
2013-07-25 10:37         ` Sedat Dilek
2013-07-25 13:36           ` Daniel Vetter
2013-07-25 14:23             ` Sedat Dilek
2013-07-25 14:27               ` Daniel Vetter
2013-07-25 15:03                 ` Sedat Dilek
2013-07-25 15:05                   ` Daniel Vetter
2013-07-25 15:34                     ` Sedat Dilek
2013-07-25 16:11                       ` Sedat Dilek
2013-07-25 16:31                         ` Chris Wilson
2013-07-25 16:35                           ` Sedat Dilek
2013-07-25 17:01                             ` Chris Wilson
2013-07-25 17:15                               ` Sedat Dilek
2013-07-25 17:26                                 ` Chris Wilson
2013-07-25 17:52                                   ` Sedat Dilek
2013-07-25 17:55                                     ` Sedat Dilek [this message]
2013-07-25 18:03                                       ` Sedat Dilek
2013-07-25 18:45                                         ` Chris Wilson
2013-07-25 18:50                                           ` Sedat Dilek
2013-07-25 19:00                                             ` Chris Wilson
2013-07-25 19:12                                               ` Sedat Dilek
2013-07-25 19:22                                                 ` Chris Wilson
2013-07-25 19:32                                                   ` Sedat Dilek
2013-07-25 20:07                                                     ` Sedat Dilek
2013-07-25 21:52                                                       ` Chris Wilson
2013-07-25 23:21                                                         ` Sedat Dilek
2013-07-25 23:25                                                           ` Chris Wilson
2013-07-26  7:15                                                             ` Sedat Dilek
2013-07-26  7:26                                                               ` Chris Wilson
2013-07-26  8:25                                                                 ` Sedat Dilek
2013-07-26  8:27                                                                   ` Sedat Dilek
2013-07-26  8:50                                                                     ` Chris Wilson
2013-07-26  8:52                                                                       ` Daniel Vetter
2013-07-26  9:02                                                                         ` Sedat Dilek
2013-07-26  9:11                                                                           ` Sedat Dilek
2013-07-26  9:16                                                                             ` Daniel Vetter
2013-07-26  9:32                                                                               ` Sedat Dilek
2013-07-26 10:34                                                                                 ` Sedat Dilek
2013-07-25 18:03                                     ` Chris Wilson

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=CA+icZUXz+6MgbW952fU_da1-RfX8CSZp76gJnOwGDNsd-rdebA@mail.gmail.com \
    --to=sedat.dilek@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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

all inboxes | Powered by JetHome®