mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ilija Hadzic <ihadzic@research.bell-labs.com>
To: Marco Munderloh <munderl@tnt.uni-hannover.de>
Cc: Ilija Hadzic <ilijahadzic@gmail.com>,
	Michal Hocko <mhocko@suse.cz>,
	Thomas Hellstrom <thellstrom@vmware.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm: fix i_mapping and f_mapping initialization in drm_open in error path
Date: Tue, 2 Apr 2013 08:31:18 -0500 (CDT)	[thread overview]
Message-ID: <Pine.GSO.4.64.1304020809300.5951@umail> (raw)
In-Reply-To: <515AC8A1.1070901@tnt.uni-hannover.de>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed, Size: 3364 bytes --]


Marco,

What makes you think that the crash after second modprobe is related to 
the mappings pointers in DRM module? Can you actually establish the 
correlation between these patches and the crash or you are just suspecting 
because your other bug had something to do with module removal/insertion?

If it's the latter, then you may want to open another bug report here 
https://bugs.freedesktop.org/ (use DRI for product and pick DRM/radeon for 
component) and have this issue tracked and addressed separately.

The divide error that your log shows apparently happens at this line
inside r6xx_remap_render_backend:

pipe_rb_ratio = rendering_pipe_num / req_rb_num;

I would suspect that req_rb_num somehow evaluates to zero at the second 
modprobe. That variable seems to be the derived of the last three 
arguments to r6xx_remap_render_backend. If I look at the caller 
(evergreen_gpu_init) the arguments that have the play here are all derived 
from the GPU's hardware registers (or are the constant for a given GPU 
device). So I suspect that the GPU driver leaves some state in GPU at 
module removal that later bites you.

-- Ilija

On Tue, 2 Apr 2013, Marco Munderloh wrote:

> Hi Ilija,
>
>> Thanks for testing. Other issues are probably unrelated, so I'll send the 
>> last version of the patch to Dave.
>
> I came across another problem which seems related. rmmod radeon works, 
> however, modprobe radeon afterwards results in a crash (divide error), see 
> attachment.
>
> Best, Marco
>
> On 02.04.2013 13:23, Ilija Hadzic wrote:
>> 
>> -- Ilija
>> 
>> On Tue, Apr 2, 2013 at 6:36 AM, Marco Munderloh 
>> <munderl@tnt.uni-hannover.de <mailto:munderl@tnt.uni-hannover.de>> wrote:
>>
>>         Attached is a v2 of the patch, for reference. I would appreciate if 
>> the original reporter or you tested it in lieu of your proposed patch and 
>> let me know if it
>>         fixes your
>>         issue.
>> 
>>
>>     The patch works for me. echo 3 > /proc/sys/vm/drop_caches as well as 
>> rmmod radeon do not end up in a crash anymore. However, I have still no 
>> clue why one of these makes
>>     drm_open to fail. On rmmod radeon I get the following log messages. If 
>> don't know if the 'unpin not necessary' has anything to do with it.
>>
>>     [drm] radeon: finishing device.
>>     radeon 0000:01:00.0: ffff88024e526c00 unpin not necessary
>>     radeon 0000:01:00.0: ffff88024f2f6000 unpin not necessary
>>     radeon 0000:01:00.0: ffff88024f2f6000 unpin not necessary
>>     [TTM] Finalizing pool allocator
>>     [TTM] Finalizing DMA pool allocator
>>     [TTM] Zone  kernel: Used memory at exit: 0 kiB
>>     [TTM] Zone   dma32: Used memory at exit: 0 kiB
>>     [drm] radeon: ttm finalized
>>     vga_switcheroo: disabled
>>     [drm] Module unloaded
>>
>>     By the way, sometimes my r8169 ethernet controller does not survive 
>> suspend/hibernation (does not detect link). rmmod/modprobe helps. I don't 
>> know if this is related.
>> 
>> 
>
> -- 
> Dipl.-Ing. Marco Munderloh             Mail: munderl@tnt.uni-hannover.de
> Institut für Informationsverarbeitung (TNT)     Phone: +49 511 762-19587
> Leibniz Universitaet Hannover, Appelstr. 9a       Fax: +49 511 762- 5333
> 30167 Hannover, Germany     Web: http://www.tnt.uni-hannover.de/~munderl
>

  reply	other threads:[~2013-04-02 13:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 19:56 Michal Hocko
2013-03-30 22:26 ` Ilija Hadzic
2013-03-31 10:34   ` Michal Hocko
2013-04-01 18:14     ` Ilija Hadzic
2013-04-02  8:25       ` Michal Hocko
2013-04-02 10:36       ` Marco Munderloh
     [not found]         ` <CA+4h6HkOSPUpfT-5Hwe+zRkmSdhURM6Tv4RxM+9PMCEvG+tjZw@mail.gmail.com>
2013-04-02 12:01           ` Marco Munderloh
2013-04-02 13:31             ` Ilija Hadzic [this message]
2013-04-02 13:48               ` Alex Deucher

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=Pine.GSO.4.64.1304020809300.5951@umail \
    --to=ihadzic@research.bell-labs.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ilijahadzic@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=munderl@tnt.uni-hannover.de \
    --cc=thellstrom@vmware.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

all inboxes | Powered by JetHome®