From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Emil Velikov <emil.l.velikov@gmail.com>,
Daniel Kurtz <djkurtz@google.com>
Cc: cpgs@samsung.com, dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] xf86drm: remove to open the DRM device unnecessarily
Date: Fri, 29 May 2015 15:50:33 +0900 [thread overview]
Message-ID: <55680C39.6070900@samsung.com> (raw)
In-Reply-To: <CACvgo51ORXsQtLLd+J5xEuDcqgyr66a64PiPM9X+047+MFL9wg@mail.gmail.com>
On 05/29/2015 12:51 AM, Emil Velikov wrote:
> 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 ?
>
I'm unhappy about to open DRM device always via drmAvailable(). IMHO
it's enough to check DRM device can be open by drmOpenByBusid() or
drmOpenByName() if don't load module and actually i expect DRM device
is open only once when call drmOpenWithType().
> 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
next prev parent reply other threads:[~2015-05-29 6:50 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
2015-05-29 6:50 ` Joonyoung Shim [this message]
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=55680C39.6070900@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=cpgs@samsung.com \
--cc=djkurtz@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.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