From: "Noralf Trønnes" <noralf@tronnes.org> To: dri-devel@lists.freedesktop.org, linux-usb@vger.kernel.org Subject: Re: [PATCH 08/10] drm: Add Generic USB Display driver Date: Sat, 2 May 2020 19:58:05 +0200 [thread overview] Message-ID: <7ebe9c87-55f8-ae1f-5bdf-3413d676f3d7@tronnes.org> (raw) In-Reply-To: <20200429124830.27475-9-noralf@tronnes.org> Den 29.04.2020 14.48, skrev Noralf Trønnes: > This adds a generic USB display driver with the intention that it can be > used with future USB interfaced low end displays/adapters. The Linux > gadget device driver will serve as the canonical device implementation. > > The following DRM properties are supported: > - Plane rotation > - Connector TV properties > > There is also support for backlight brightness exposed as a backlight > device. > > Display modes can be made available to the host driver either as DRM > display modes or through EDID. If both are present, EDID is just passed > on to userspace. > > Performance is preferred over color depth, so if the device supports > RGB565, DRM_CAP_DUMB_PREFERRED_DEPTH will return 16. > > If the device transfer buffer can't fit an uncompressed framebuffer > update, the update is split up into parts that do fit. > > Optimal user experience is achieved by providing damage reports either by > setting FB_DAMAGE_CLIPS on pageflips or calling DRM_IOCTL_MODE_DIRTYFB. > > LZ4 compression is used if the device supports it. > > The driver supports a one bit monochrome transfer format: R1. This is not > implemented in the gadget driver. It is added in preparation for future > monochrome e-ink displays. > > The driver is MIT licensed to smooth the path for any BSD port of the > driver. > > Signed-off-by: Noralf Trønnes <noralf@tronnes.org> > --- > diff --git a/drivers/gpu/drm/gud/gud_drm_drv.c b/drivers/gpu/drm/gud/gud_drm_drv.c > +static int gud_drm_probe(struct usb_interface *interface, > + const struct usb_device_id *id) > +{ <snip> > + gdrm = kzalloc(sizeof(*gdrm), GFP_KERNEL); > + if (!gdrm) > + return -ENOMEM; > + > + gdrm->usb = usb; > + gdrm->ifnum = interface->cur_altsetting->desc.bInterfaceNumber; > + gdrm->compression = desc.bCompression & GUD_DRM_COMPRESSION_LZ4; > + > + drm = &gdrm->drm; > + ret = devm_drm_dev_init(dev, drm, &gud_drm_driver); > + if (ret) { > + kfree(gdrm); > + return ret; > + } I see that Daniel's series has landed now, so I will use devm_drm_dev_alloc() and drmm_mode_config_init() in the next version. <snip> > + drm_fbdev_generic_setup(drm, 16); This should be: drm_fbdev_generic_setup(drm, 0); Noralf. > + > + return 0; > +}
WARNING: multiple messages have this Message-ID (diff)
From: "Noralf Trønnes" <noralf@tronnes.org> To: dri-devel@lists.freedesktop.org, linux-usb@vger.kernel.org Subject: Re: [PATCH 08/10] drm: Add Generic USB Display driver Date: Sat, 2 May 2020 19:58:05 +0200 [thread overview] Message-ID: <7ebe9c87-55f8-ae1f-5bdf-3413d676f3d7@tronnes.org> (raw) In-Reply-To: <20200429124830.27475-9-noralf@tronnes.org> Den 29.04.2020 14.48, skrev Noralf Trønnes: > This adds a generic USB display driver with the intention that it can be > used with future USB interfaced low end displays/adapters. The Linux > gadget device driver will serve as the canonical device implementation. > > The following DRM properties are supported: > - Plane rotation > - Connector TV properties > > There is also support for backlight brightness exposed as a backlight > device. > > Display modes can be made available to the host driver either as DRM > display modes or through EDID. If both are present, EDID is just passed > on to userspace. > > Performance is preferred over color depth, so if the device supports > RGB565, DRM_CAP_DUMB_PREFERRED_DEPTH will return 16. > > If the device transfer buffer can't fit an uncompressed framebuffer > update, the update is split up into parts that do fit. > > Optimal user experience is achieved by providing damage reports either by > setting FB_DAMAGE_CLIPS on pageflips or calling DRM_IOCTL_MODE_DIRTYFB. > > LZ4 compression is used if the device supports it. > > The driver supports a one bit monochrome transfer format: R1. This is not > implemented in the gadget driver. It is added in preparation for future > monochrome e-ink displays. > > The driver is MIT licensed to smooth the path for any BSD port of the > driver. > > Signed-off-by: Noralf Trønnes <noralf@tronnes.org> > --- > diff --git a/drivers/gpu/drm/gud/gud_drm_drv.c b/drivers/gpu/drm/gud/gud_drm_drv.c > +static int gud_drm_probe(struct usb_interface *interface, > + const struct usb_device_id *id) > +{ <snip> > + gdrm = kzalloc(sizeof(*gdrm), GFP_KERNEL); > + if (!gdrm) > + return -ENOMEM; > + > + gdrm->usb = usb; > + gdrm->ifnum = interface->cur_altsetting->desc.bInterfaceNumber; > + gdrm->compression = desc.bCompression & GUD_DRM_COMPRESSION_LZ4; > + > + drm = &gdrm->drm; > + ret = devm_drm_dev_init(dev, drm, &gud_drm_driver); > + if (ret) { > + kfree(gdrm); > + return ret; > + } I see that Daniel's series has landed now, so I will use devm_drm_dev_alloc() and drmm_mode_config_init() in the next version. <snip> > + drm_fbdev_generic_setup(drm, 16); This should be: drm_fbdev_generic_setup(drm, 0); Noralf. > + > + return 0; > +} _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-05-02 17:58 UTC|newest] Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-29 12:48 [PATCH 00/10] Generic USB Display driver Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 01/10] backlight: Add backlight_device_get_by_name() Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-04-30 8:32 ` Lee Jones 2020-04-30 8:32 ` Lee Jones 2020-04-30 9:20 ` Noralf Trønnes 2020-04-30 9:20 ` Noralf Trønnes 2020-04-30 10:15 ` Lee Jones 2020-04-30 10:15 ` Lee Jones 2020-04-30 10:42 ` Noralf Trønnes 2020-04-30 10:42 ` Noralf Trønnes 2020-04-30 14:02 ` Daniel Vetter 2020-04-30 14:02 ` Daniel Vetter 2020-05-04 7:10 ` Lee Jones 2020-05-04 7:10 ` Lee Jones 2020-05-03 7:13 ` Sam Ravnborg 2020-05-03 7:13 ` Sam Ravnborg 2020-04-29 12:48 ` [PATCH 02/10] drm: Add backlight helper Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-04-29 14:13 ` Hans de Goede 2020-04-29 14:13 ` Hans de Goede 2020-04-29 18:40 ` Noralf Trønnes 2020-04-29 18:40 ` Noralf Trønnes 2020-04-30 15:36 ` Hans de Goede 2020-04-30 15:36 ` Hans de Goede 2020-05-04 12:06 ` Daniel Vetter 2020-05-04 12:06 ` Daniel Vetter 2020-05-04 15:54 ` Noralf Trønnes 2020-05-04 15:54 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 03/10] drm/client: Add drm_client_init_from_id() Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 04/10] drm/client: Add drm_client_framebuffer_flush() Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-05-03 7:48 ` Sam Ravnborg 2020-05-03 7:48 ` Sam Ravnborg 2020-05-03 9:54 ` Noralf Trønnes 2020-05-03 9:54 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 05/10] drm/client: Add drm_client_modeset_check() Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-05-03 8:03 ` Sam Ravnborg 2020-05-03 8:03 ` Sam Ravnborg 2020-05-03 10:02 ` Noralf Trønnes 2020-05-03 10:02 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 06/10] drm/client: Add a way to set modeset, properties and rotation Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-05-03 8:47 ` Sam Ravnborg 2020-05-03 8:47 ` Sam Ravnborg 2020-05-03 10:50 ` Noralf Trønnes 2020-05-03 10:50 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 07/10] drm/format-helper: Add drm_fb_swab() Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-05-03 10:29 ` Sam Ravnborg 2020-05-03 10:29 ` Sam Ravnborg 2020-05-03 13:38 ` Noralf Trønnes 2020-05-03 13:38 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 08/10] drm: Add Generic USB Display driver Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-05-02 17:58 ` Noralf Trønnes [this message] 2020-05-02 17:58 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 09/10] drm/gud: Add functionality for the USB gadget side Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-04-29 12:48 ` [PATCH 10/10] usb: gadget: function: Add Generic USB Display support Noralf Trønnes 2020-04-29 12:48 ` Noralf Trønnes 2020-05-01 13:22 ` [PATCH 00/10] Generic USB Display driver Noralf Trønnes 2020-05-01 13:22 ` Noralf Trønnes
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=7ebe9c87-55f8-ae1f-5bdf-3413d676f3d7@tronnes.org \ --to=noralf@tronnes.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-usb@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.