linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: Dave Airlie <airlied@gmail.com>
Cc: Rob Clark <rob@ti.com>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linaro-dev@lists.linaro.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, Archit Taneja <archit@ti.com>,
	linux-fbdev@vger.kernel.org
Subject: Re: Proposal for a low-level Linux display framework
Date: Sat, 17 Sep 2011 19:06:00 +0000	[thread overview]
Message-ID: <4E74EF98.3060106@gmx.de> (raw)
In-Reply-To: <CAPM=9txHu7mzH8p8g=FmHsjvmAT-aMy-xEFj4odXEvnbs-bhMw@mail.gmail.com>

On 09/17/2011 06:23 PM, Dave Airlie wrote:
>>
>> Is it? Well, okay, I don't want to use any acceleration that can crash my
>> machine, where can I select it, preferably as compile time option? I didn't find
>> such a thing for Intel or Radeon. Don't say, I should rely on userspace here or
>> use fbdev for this.
> 
> Just tell the X driver to not use acceleration, and it you won't get
> any acceleration used, then you get complete stability. If a driver
> writer wants to turn off all accel in the kernel driver, it can, its
> not an option we've bothered with for intel or radeon since it really
> makes no sense. To put it simply you don't really seem to understand
> the driver model around KMS. If no userspace app uses acceleration
> then no acceleration features will magically happen. If you want to
> write a simple app against the KMS API like plymouth you can now use
> the dumb ioctls to create and map a buffer that can be made into a
> framebuffer. Also you get hw cursors + modesetting.

Again, you seem to not understand my reasoning. The "if" is the problem, it's
the kernels job to ensure stability. Allowing the userspace to decide whether it
crashes my machine is not acceptable to me.
I do not claim that it is impossible to write a KMS driver in a way that it does
not crash, but it seems more difficult than writing an fbdev driver.

>> The thing is that the core fbdev API does not expose any acceleration to
>> userspace, maybe some drivers do via IOCTLs, but I hope that are only things
>> that can be done in a sane way, otherwise I'd consider it a bug. The story is
>> different for DRM/KMS, as I understand, as this was primarily for acceleration
>> and only recently got modesetting capabilities.
> 
> The core drm/kms ioctls don't expose acceleration to userspace either,
> again misinformation seems to drive most of your logic. You can't do
> generic useful acceleration from the kernel. A lot of modern GPU
> hardware doesn't even have bitblt engines.

I did not say that it is used directly for acceleration, but wasn't the point of
DRM to allow acceleration in the first place?

>> It's true that mmap can be PITA, but I don't see any real alternative given that
>> you want directly map video memory, especially on low end systems. And there are
>> ways around it, you can forbid mapping (though probably most userspace wouldn't
>> like it, I guess) or use any other solution like defio.
>> If you'd stop exposing the fbdev userspace interface it'd just harden my opinion
>> that KMS is a piece of trash and that I should avoid hardware that does not have
>> a native framebuffer driver. I think you shouldn't do this, as it's just a
>> disadvantage for your end users, but I personally do not really care.
> 
> We've fixed this in KMS, we don't pass direct mappings to userspace
> that we can't tear down and refault. We only provide objects via
> handles. The only place its a problem is where we expose fbdev legacy
> emulation, since we have to fix the pages.

I guess we could do the same in fbdev. It's probably just that nobody is
interested in it as we do not really care about memory management.


Best regards,

Florian Tobias Schandinat

  reply	other threads:[~2011-09-17 19:06 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 12:07 Proposal for a low-level Linux display framework Tomi Valkeinen
2011-09-15 14:59 ` Keith Packard
2011-09-15 15:29   ` Tomi Valkeinen
2011-09-15 15:50     ` Keith Packard
2011-09-15 17:05       ` Alan Cox
2011-09-17 21:36         ` Laurent Pinchart
2011-09-15 17:12       ` Florian Tobias Schandinat
2011-09-15 17:18         ` Alan Cox
2011-09-15 17:47           ` Florian Tobias Schandinat
2011-09-15 19:05             ` Alan Cox
2011-09-15 19:46               ` Florian Tobias Schandinat
2011-09-15 21:31                 ` Alan Cox
2011-09-15 17:52         ` Alex Deucher
2011-09-15 17:56           ` Geert Uytterhoeven
2011-09-15 18:04             ` Alex Deucher
2011-09-15 18:39           ` Florian Tobias Schandinat
2011-09-15 18:58             ` Alan Cox
2011-09-15 19:18               ` Florian Tobias Schandinat
     [not found]                 ` <4E724F93.1050203-Mmb7MZpHnFY@public.gmane.org>
2011-09-15 19:28                   ` Alan Cox
2011-09-15 19:45                 ` Alex Deucher
2011-09-17 14:44               ` Felipe Contreras
2011-09-17 15:16                 ` Rob Clark
2011-09-17 16:11                   ` Florian Tobias Schandinat
2011-09-17 16:47                     ` Dave Airlie
2011-09-17 18:15                       ` Florian Tobias Schandinat
2011-09-17 18:23                         ` Dave Airlie
2011-09-17 19:06                           ` Florian Tobias Schandinat [this message]
2011-09-17 19:25                             ` Corbin Simpson
2011-09-17 21:25                             ` Alex Deucher
2011-09-17 20:25                           ` Alan Cox
2011-10-31 20:24                             ` Jesse Barnes
2011-09-17 16:50                     ` Rob Clark
2011-09-16  4:53             ` Keith Packard
2011-09-17 23:12             ` Laurent Pinchart
2011-09-18 16:14               ` Rob Clark
2011-09-18 21:55                 ` Laurent Pinchart
     [not found]               ` <201109180112.15896.laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2011-09-18 22:23                 ` Alan Cox
2011-09-19  0:09                   ` Rob Clark
2011-09-20 23:32                     ` Laurent Pinchart
2011-09-15 18:12         ` Keith Packard
2011-09-15 17:21       ` Tomi Valkeinen
2011-09-15 18:32         ` Rob Clark
2011-09-16  0:55         ` Keith Packard
2011-09-16  6:38           ` Tomi Valkeinen
2011-09-16 14:17           ` Daniel Vetter
2011-09-16 16:53           ` Alan Cox
2011-09-19  6:33             ` Tomi Valkeinen
2011-09-19  6:53               ` Keith Packard
2011-09-19  7:29                 ` Tomi Valkeinen
2011-09-20  8:29                   ` Patrik Jakobsson
2011-09-20 15:55                     ` Keith Packard
2011-09-20 21:20                       ` Patrik Jakobsson
2011-09-21  6:01                         ` Tomi Valkeinen
2011-09-21 18:07                           ` Patrik Jakobsson
2011-09-15 15:03 ` Kyungmin Park
2011-09-21 13:26 ` Heiko Stübner

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=4E74EF98.3060106@gmx.de \
    --to=florianschandinat@gmx.de \
    --cc=airlied@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=archit@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felipe.contreras@gmail.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob@ti.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;
as well as URLs for NNTP newsgroup(s).