From: Thomas Zimmermann <tzimmermann@suse.de>
To: Zack Rusin <zackr@vmware.com>, dri-devel@lists.freedesktop.org
Cc: krastevm@vmware.com, mombasawalam@vmware.com, banackm@vmware.com
Subject: Re: [PATCH v2 13/16] drm/vmwgfx: Port the framebuffer code to drm fb helpers
Date: Thu, 20 Oct 2022 11:06:40 +0200 [thread overview]
Message-ID: <dce8c2de-0e2c-0b99-e30f-29411e8d6908@suse.de> (raw)
In-Reply-To: <20221020034131.491973-14-zack@kde.org>
[-- Attachment #1.1: Type: text/plain, Size: 2252 bytes --]
Hi Zack
Am 20.10.22 um 05:41 schrieb Zack Rusin:
> From: Zack Rusin <zackr@vmware.com>
[...]
> @@ -1670,6 +1640,10 @@ static int vmw_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> if (ret)
> goto out_unload;
>
> + vmw_fifo_resource_inc(vmw);
> + vmw_svga_enable(vmw);
> + drm_fbdev_generic_setup(&vmw->drm, vmw->assume_16bpp ? 16 : 32);
The preferred way of setting the color depth is with struct
drm_mode_config.preferred_depth. [1] Note that it is the color depth;
not the pixel size. In your case:
if (vmw->assume_16bpp)
dev->mode_config.preferred_depth = 16;
else
dev->mode_config.preferred_depth = 24;
It's also a hint to userspace. [2]
The prefer_bpp parameter of drm_fbdev_generic_setup() should be 0. It is
a fallback to force a certain pixel size, as preferred_depth fails.
[1]
https://elixir.bootlin.com/linux/v6.1-rc1/source/include/drm/drm_mode_config.h#L883
[2]
https://elixir.bootlin.com/linux/v6.1-rc1/source/drivers/gpu/drm/drm_ioctl.c#L272
> +
> vmw_debugfs_gem_init(vmw);
> vmw_debugfs_resource_managers_init(vmw);
>
[...]
> -
> -/**
> - * vmw_fb_dirty_flush - flush dirty regions to the kms framebuffer
> - *
> - * @work: The struct work_struct associated with this task.
> - *
> - * This function flushes the dirty regions of the vmalloc framebuffer to the
> - * kms framebuffer, and if the kms framebuffer is visible, also updated the
> - * corresponding displays. Note that this function runs even if the kms
> - * framebuffer is not bound to a crtc and thus not visible, but it's turned
> - * off during hibernation using the par->dirty.active bool.
> - */
> -static void vmw_fb_dirty_flush(struct work_struct *work)
This is the flush function for vmwgfx' deferred I/O. If you want to
implement deferred I/O with the generic fbdev emulation, you have to set
struct drm_mode_config.prefer_shadow_fbdev to true. [3]
[3]
https://elixir.bootlin.com/linux/v6.1-rc1/source/include/drm/drm_mode_config.h#L890
Best regards
Thomas
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2022-10-20 9:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 3:41 [PATCH v2 00/16] drm/vmwgfx: fb, cursors and hashtable refactor Zack Rusin
2022-10-20 3:41 ` [PATCH v2 01/16] drm/vmwgfx: Write the driver id registers Zack Rusin
2022-10-20 3:41 ` [PATCH v2 02/16] drm/vmwgfx: Fix frame-size warning in vmw_mksstat_add_ioctl Zack Rusin
2022-10-20 3:41 ` [PATCH v2 03/16] drm/vmwgfx: Refactor resource manager's hashtable to use linux/hashtable implementation Zack Rusin
2022-10-20 3:41 ` [PATCH v2 04/16] drm/vmwgfx: Remove ttm object hashtable Zack Rusin
2022-10-20 3:41 ` [PATCH v2 05/16] drm/vmwgfx: Refactor resource validation hashtable to use linux/hashtable implementation Zack Rusin
2022-10-20 3:41 ` [PATCH v2 06/16] drm/vmwgfx: Clean up cursor mobs Zack Rusin
2022-10-20 3:41 ` [PATCH v2 07/16] drm/vmwgfx: Start diffing new mob cursors against old ones Zack Rusin
2022-10-20 3:41 ` [PATCH v2 08/16] drm/vmwgfx: Support cursor surfaces with mob cursor Zack Rusin
2022-10-20 3:41 ` [PATCH v2 09/16] drm/vmwgfx: Diff cursors when using cmds Zack Rusin
2022-10-20 3:41 ` [PATCH v2 10/16] drm/vmwgfx: Refactor ttm reference object hashtable to use linux/hashtable Zack Rusin
2022-10-20 3:41 ` [PATCH v2 11/16] drm/vmwgfx: Remove vmwgfx_hashtab Zack Rusin
2022-10-20 3:41 ` [PATCH v2 12/16] drm/vmwgfx: Do not allow invalid bpp's for dumb buffers Zack Rusin
2022-10-20 3:41 ` [PATCH v2 13/16] drm/vmwgfx: Port the framebuffer code to drm fb helpers Zack Rusin
2022-10-20 9:06 ` Thomas Zimmermann [this message]
2022-10-20 18:37 ` Zack Rusin
2022-10-21 7:06 ` Thomas Zimmermann
2022-10-20 3:41 ` [PATCH v2 14/16] drm/vmwgfx: Remove explicit and broken vblank handling Zack Rusin
2022-10-20 3:41 ` [PATCH v2 15/16] drm/vmwgfx: Add a mksstat counter for cotable resizes Zack Rusin
2022-10-20 3:41 ` [PATCH v2 16/16] drm/vmwgfx: Optimize initial sizes of cotables Zack Rusin
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=dce8c2de-0e2c-0b99-e30f-29411e8d6908@suse.de \
--to=tzimmermann@suse.de \
--cc=banackm@vmware.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=krastevm@vmware.com \
--cc=mombasawalam@vmware.com \
--cc=zackr@vmware.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