From: Thomas Zimmermann <tzimmermann@suse.de> To: Adam Jackson <ajax@redhat.com>, airlied@linux.ie, daniel@ffwll.ch, b.zolnierkie@samsung.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 02/11] drm/fbdevdrm: Add fbdevdrm device Date: Wed, 27 Mar 2019 07:55:03 +0000 [thread overview] Message-ID: <a0697626-dc39-702e-3850-def8cbc71508@suse.de> (raw) In-Reply-To: <0d2e7dccd35523dd652a3d4af4b031f8d9ab8efd.camel@redhat.com> [-- Attachment #1.1: Type: text/plain, Size: 2077 bytes --] Hi Am 26.03.19 um 17:03 schrieb Adam Jackson: > On Tue, 2019-03-26 at 10:17 +0100, Thomas Zimmermann wrote: > >> +static bool is_generic_driver(const struct fb_info *fb_info) >> +{ >> + /* DRM porting note: We don't want to bind to vga16fb, vesafb, or any >> + * other generic fbdev driver. Usually, these drivers have limited >> + * capabilitis. We only continue if the fix structure indicates a >> + * hardware-specific drivers . This test will also sort out drivers >> + * registered via DRM's fbdev emulation. If you're porting an fbdev >> + * driver to DRM, you can remove this test. The module's PCI device >> + * ids will contain this information. >> + */ >> + return !fb_info->fix.accel && >> + !!strcmp(fb_info->fix.id, "S3 Virge/DX"); >> +} > > This seems odd. s3fb sets fix.accel to NULL unconditionally AFAICT, not > sure why you're testing for that explicitly. If accel is 0, it might be a generic driver. Hence, fbdevdrm ignored s3fb, so I added the exception. > I do have a question though: why _not_ support generic fbdev drivers? > If I had that, and the ability to disable creation of /dev/fb*, I could > expose a consistent video device enumeration to userspace. As it stands > I have no reasonable way of knowing which fbdev and drm devices are > pointed at the same hardware. If there were only drm devices... Ignoring generic drivers seemed like the safe bet for now. I found that vga16fb, vesafb, etc bind to hardware and later get replaced by HW-specific drivers; DRM drivers with FB emulation should not be handled by fbdevdrm. So for now, fbdevdrm ignores all this. This all comes from using the event-reporting mechanism to hook into the fbdev module. Daniel suggested to copy over some of the fbdev drivers for porting, which would solve the problem. Best regards Thomas > > - ajax > -- Thomas Zimmermann Graphics Driver Developer SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg) [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de> To: Adam Jackson <ajax@redhat.com>, airlied@linux.ie, daniel@ffwll.ch, b.zolnierkie@samsung.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 02/11] drm/fbdevdrm: Add fbdevdrm device Date: Wed, 27 Mar 2019 08:55:03 +0100 [thread overview] Message-ID: <a0697626-dc39-702e-3850-def8cbc71508@suse.de> (raw) In-Reply-To: <0d2e7dccd35523dd652a3d4af4b031f8d9ab8efd.camel@redhat.com> [-- Attachment #1.1.1: Type: text/plain, Size: 2077 bytes --] Hi Am 26.03.19 um 17:03 schrieb Adam Jackson: > On Tue, 2019-03-26 at 10:17 +0100, Thomas Zimmermann wrote: > >> +static bool is_generic_driver(const struct fb_info *fb_info) >> +{ >> + /* DRM porting note: We don't want to bind to vga16fb, vesafb, or any >> + * other generic fbdev driver. Usually, these drivers have limited >> + * capabilitis. We only continue if the fix structure indicates a >> + * hardware-specific drivers . This test will also sort out drivers >> + * registered via DRM's fbdev emulation. If you're porting an fbdev >> + * driver to DRM, you can remove this test. The module's PCI device >> + * ids will contain this information. >> + */ >> + return !fb_info->fix.accel && >> + !!strcmp(fb_info->fix.id, "S3 Virge/DX"); >> +} > > This seems odd. s3fb sets fix.accel to NULL unconditionally AFAICT, not > sure why you're testing for that explicitly. If accel is 0, it might be a generic driver. Hence, fbdevdrm ignored s3fb, so I added the exception. > I do have a question though: why _not_ support generic fbdev drivers? > If I had that, and the ability to disable creation of /dev/fb*, I could > expose a consistent video device enumeration to userspace. As it stands > I have no reasonable way of knowing which fbdev and drm devices are > pointed at the same hardware. If there were only drm devices... Ignoring generic drivers seemed like the safe bet for now. I found that vga16fb, vesafb, etc bind to hardware and later get replaced by HW-specific drivers; DRM drivers with FB emulation should not be handled by fbdevdrm. So for now, fbdevdrm ignores all this. This all comes from using the event-reporting mechanism to hook into the fbdev module. Daniel suggested to copy over some of the fbdev drivers for porting, which would solve the problem. Best regards Thomas > > - ajax > -- Thomas Zimmermann Graphics Driver Developer SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg) [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-03-27 7:55 UTC|newest] Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-26 9:17 [RFC][PATCH 00/11] DRM driver for fbdev devices Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 9:17 ` [PATCH 01/11] drm/fbdevdrm: Add driver skeleton Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 9:17 ` [PATCH 02/11] drm/fbdevdrm: Add fbdevdrm device Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 16:03 ` Adam Jackson 2019-03-26 16:03 ` Adam Jackson 2019-03-27 7:55 ` Thomas Zimmermann [this message] 2019-03-27 7:55 ` Thomas Zimmermann 2019-03-27 8:03 ` Daniel Vetter 2019-03-27 8:03 ` Daniel Vetter 2019-03-26 9:17 ` [PATCH 03/11] drm/fbdevdrm: Add memory management Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 9:17 ` [PATCH 04/11] drm/fbdevdrm: Add file operations Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 9:17 ` [PATCH 05/11] drm/fbdevdrm: Add GEM and dumb interfaces Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 9:17 ` [PATCH 06/11] drm/fbdevdrm: Add modesetting infrastructure Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 9:17 ` [PATCH 07/11] drm/fbdevdrm: Add DRM <-> fbdev pixel-format conversion Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 16:29 ` Ville Syrjälä 2019-03-26 16:29 ` Ville Syrjälä 2019-03-27 8:28 ` Thomas Zimmermann 2019-03-27 8:28 ` Thomas Zimmermann 2019-03-27 10:00 ` Ville Syrjälä 2019-03-27 10:00 ` Ville Syrjälä 2019-03-26 9:17 ` [PATCH 08/11] drm/fbdevdrm: Add mode conversion DRM <-> fbdev Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 9:17 ` [PATCH 09/11] drm/fbdevdrm: Add primary plane Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 13:33 ` Mathieu Malaterre 2019-03-26 13:33 ` Mathieu Malaterre 2019-03-26 13:57 ` Thomas Zimmermann 2019-03-26 13:57 ` Thomas Zimmermann 2019-03-27 9:37 ` Thomas Zimmermann 2019-03-27 9:37 ` Thomas Zimmermann 2019-04-02 7:08 ` Mathieu Malaterre 2019-04-02 7:08 ` Mathieu Malaterre 2019-03-26 9:17 ` [PATCH 10/11] drm/fbdevdrm: Add CRTC Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 9:17 ` [PATCH 11/11] drm/fbdevdrm: Detect and validate display modes Thomas Zimmermann 2019-03-26 9:17 ` Thomas Zimmermann 2019-03-26 16:47 ` Ville Syrjälä 2019-03-26 16:47 ` Ville Syrjälä 2019-03-26 18:20 ` Daniel Vetter 2019-03-26 18:20 ` Daniel Vetter 2019-03-27 8:31 ` Thomas Zimmermann 2019-03-27 8:31 ` Thomas Zimmermann 2019-03-26 14:53 ` [RFC][PATCH 00/11] DRM driver for fbdev devices Daniel Vetter 2019-03-26 14:53 ` Daniel Vetter 2019-03-27 9:10 ` Thomas Zimmermann 2019-03-27 9:10 ` Thomas Zimmermann 2019-03-27 9:41 ` Daniel Vetter 2019-03-27 9:41 ` Daniel Vetter 2019-03-27 9:55 ` Michel Dänzer 2019-03-27 9:55 ` Michel Dänzer 2019-03-27 10:58 ` Daniel Vetter 2019-03-27 10:58 ` Daniel Vetter 2019-03-27 14:46 ` Thomas Zimmermann 2019-03-27 14:46 ` Thomas Zimmermann 2019-03-27 17:05 ` Daniel Vetter 2019-03-27 17:05 ` Daniel Vetter
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=a0697626-dc39-702e-3850-def8cbc71508@suse.de \ --to=tzimmermann@suse.de \ --cc=airlied@linux.ie \ --cc=ajax@redhat.com \ --cc=b.zolnierkie@samsung.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-fbdev@vger.kernel.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: linkBe 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.