All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Daniel Kurtz <djkurtz@google.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] xf86drm: remove to open the DRM device unnecessarily
Date: Thu, 28 May 2015 16:51:53 +0100	[thread overview]
Message-ID: <CACvgo51ORXsQtLLd+J5xEuDcqgyr66a64PiPM9X+047+MFL9wg@mail.gmail.com> (raw)
In-Reply-To: <CAGS+omCQEOFP=OUjReUtmb82KHYjKW-z64vsz-fcv_Cc-V1LEw@mail.gmail.com>

Seems like I'm either too subtle and/or too stingy earlier.

If drmAvailable() returns false, we have two options:
 - opt for the old-schoold (dri1) and ask drm_server_info to load the
module for us, or
 - bail out, as neither drmOpenByBusid() or drmOpenByName() will be
able to open the device considering that a DRM module is not loaded.

So what I was hinting earlier was to make the above more obvious,
rather than reordering the arguments in the if clause. How does that
sound ?

Thanks
Emil

On 28 May 2015 at 15:15, Daniel Kurtz <djkurtz@google.com> wrote:
> It's not necessary if we are about to skip the rest of the if clause anyway
> because name is NULL.
>
> On May 28, 2015 9:14 PM, "Emil Velikov" <emil.l.velikov@gmail.com> wrote:
>>
>> On 28 May 2015 at 00:57, Joonyoung Shim <jy0922.shim@samsung.com> wrote:
>> > This is to remove to open the DRM device unnecessarily as call
>> > drmAvailable() when name is NULL or drm_server_info is NULL in
>> > drmOpenWithType function.
>> >
>> Why do you believe that calling drmAvailable() is not necessary ? If
>> that's the case should one just nuke the call all together ?
>>
>> -Emil
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-05-28 15:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  0:57 [PATCH] xf86drm: remove to open the DRM device unnecessarily Joonyoung Shim
2015-05-28  9:00 ` Zhou, Jammy
2015-05-28 13:13 ` Emil Velikov
2015-05-28 14:15   ` Daniel Kurtz
2015-05-28 15:51     ` Emil Velikov [this message]
2015-05-29  6:50       ` Joonyoung Shim
2015-05-30 13:20         ` Emil Velikov
2015-06-01  2:53           ` Joonyoung Shim

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=CACvgo51ORXsQtLLd+J5xEuDcqgyr66a64PiPM9X+047+MFL9wg@mail.gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=djkurtz@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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.