public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Max Staudt <mstaudt@suse.de>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	eich@suse.de, thellstrom@vmware.com, tomi.valkeinen@ti.com
Subject: Re: [PATCH 2/3] Define fb_open_adj_file()
Date: Tue, 24 May 2016 18:28:44 +0200	[thread overview]
Message-ID: <5744813C.5080909@suse.de> (raw)
In-Reply-To: <20160523134457.GZ27098@phenom.ffwll.local>

Hi Daniel,

Thanks for the feedback! Comments below:


On 05/23/2016 03:44 PM, Daniel Vetter wrote:
> Do we _really_ care about fbdev mmap support so much that we want to add
> more hacks all over the place (in each driver) to make it work? Given that
> fbdev is officially in the "no more drivers" territory, I'm not sure we
> want this either.
> 
> The trouble is that fbdev mmap and kms dumb buffer mmap have different
> semantics and so every driver needs to implement both if they're special
> in any kind of way.

DRM drivers already have fbdev hacks in place in order to implement both semantics.

With this change, only bochsdrm(fb) will need to be touched, and if no further DRM driver implements fbdev support the way bochsdrmfb does, then no further driver will need this code.


This patch set is really just about setting file->f_mapping in bochsdrmfb's fb_open(), so we finally get rid of the WARNING.

We could also pass file as a third paramenter in fb_open(), changing the function definition in all fbdev drivers. I'm happy to change the patch in that way if this is preferred.


> If we can't say no to fbdev mmap then I think we should implement
> something that works for all drivers. I'm thinking of allocating just a
> pile of pages in the fbdev emulation, and then copying them over using the
> defio stuff we just merged for 4.7 into a dumb bo, plus calling dirtyfb.
> Or at least something along those lines. Of couse just opt-in, in case the
> driver can do a more traditional mmio fbdev mmapping.

Well, the mmap code is standard fbdev and it's already there, so why not keep it?

All this patch series does is allowing bochsdrmfb to work properly until fbdev support is finally removed from the kernel.



Max

  reply	other threads:[~2016-05-24 16:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 10:48 [PATCH 0/3] Fix kernel WARNING in TTM/Bochs KMS driver 'Max Staudt
2016-05-23 10:48 ` [PATCH 1/3] Add missing "goto out" after fbops->fb_open() 'Max Staudt
2016-05-23 10:48 ` [PATCH 2/3] Define fb_open_adj_file() 'Max Staudt
2016-05-23 13:44   ` Daniel Vetter
2016-05-24 16:28     ` Max Staudt [this message]
2016-05-24 16:51       ` Daniel Vetter
2016-05-25 16:06         ` Max Staudt
2016-05-23 10:48 ` [PATCH 3/3] Add fb_open_adj_file() to bochsdrmfb to avoid use-after-free 'Max Staudt

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=5744813C.5080909@suse.de \
    --to=mstaudt@suse.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eich@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thellstrom@vmware.com \
    --cc=tomi.valkeinen@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