search for: format_modifiers

Displaying 20 results from an estimated 21 matches for "format_modifiers".

2020 Jul 18
2
[PATCH v2] drm/nouveau: Accept 'legacy' format modifiers
...uint32_t *tile_mode, uint8_t *kind) { + struct nouveau_display *disp = nouveau_display(drm->dev); BUG_ON(!tile_mode || !kind); + if ((modifier & (0xffull << 12)) == 0ull) { + /* Legacy modifier. Translate to this device's 'kind.' */ + modifier |= disp->format_modifiers[0] & (0xffull << 12); + } + if (modifier == DRM_FORMAT_MOD_LINEAR) { /* tile_mode will not be used in this case */ *tile_mode = 0; @@ -227,6 +233,16 @@ nouveau_framebuffer_get_layout(struct drm_framebuffer *fb, } } +static const u64 legacy_modifiers[] = { + DRM_FORMAT_MOD_NVI...
2020 Jul 18
1
[PATCH] drm/nouveau: Accept 'legacy' format modifiers
...t; + struct nouveau_display *disp = nouveau_display(drm->dev); >> BUG_ON(!tile_mode || !kind); >> >> + if ((modifier & (0xffull << 12)) == 0ull) { >> + /* Legacy modifier. Translate to this device's 'kind.' */ >> + modifier |= disp->format_modifiers[0] & (0xffull << 12); >> + } > > Hm I tried to understand what this magic does by looking at drm_fourcc.h, > but the drm_fourcc_canonicalize_nvidia_format_mod() in there implements > something else. Is that function wrong, or should we use it here instead? > > Or...
2019 Dec 11
2
[PATCH 3/3] drm/nouveau: Support NVIDIA format modifiers
...Not a full review, but you want to go off the family (chip_class iirc? something like that, should be obvious). Sadly 0x67/0x68 are higher than 0x50 numerically, but are logically part of the nv4x generation. > + return -EINVAL; > + } > + > + BUG_ON(!disp->format_modifiers); > + > + for (mod = 0; > + (disp->format_modifiers[mod] != DRM_FORMAT_MOD_INVALID) && > + (disp->format_modifiers[mod] != modifier); > + mod++); > + > + if (disp->format_modifiers[mod] == DRM_FORMAT_MOD_INVALID) &gt...
2020 Jul 17
0
[PATCH] drm/nouveau: Accept 'legacy' format modifiers
...t8_t *kind) > { > + struct nouveau_display *disp = nouveau_display(drm->dev); > BUG_ON(!tile_mode || !kind); > > + if ((modifier & (0xffull << 12)) == 0ull) { > + /* Legacy modifier. Translate to this device's 'kind.' */ > + modifier |= disp->format_modifiers[0] & (0xffull << 12); > + } Hm I tried to understand what this magic does by looking at drm_fourcc.h, but the drm_fourcc_canonicalize_nvidia_format_mod() in there implements something else. Is that function wrong, or should we use it here instead? Or is there something else going on...
2020 Jul 17
5
[PATCH] drm/nouveau: Accept 'legacy' format modifiers
...uint32_t *tile_mode, uint8_t *kind) { + struct nouveau_display *disp = nouveau_display(drm->dev); BUG_ON(!tile_mode || !kind); + if ((modifier & (0xffull << 12)) == 0ull) { + /* Legacy modifier. Translate to this device's 'kind.' */ + modifier |= disp->format_modifiers[0] & (0xffull << 12); + } + if (modifier == DRM_FORMAT_MOD_LINEAR) { /* tile_mode will not be used in this case */ *tile_mode = 0; @@ -227,6 +233,16 @@ nouveau_framebuffer_get_layout(struct drm_framebuffer *fb, } } +static const u64 legacy_modifiers[] = { + DRM_FORMAT_MOD_NVI...
2020 Jul 30
0
[PATCH v4] drm/nouveau: Accept 'legacy' format modifiers
...t nouveau_drm *drm, * Extract the block height and kind from the corresponding * modifier fields. See drm_fourcc.h for details. */ + + if ((modifier & (0xffull << 12)) == 0ull) { + /* Legacy modifier. Translate to this dev's 'kind.' */ + modifier |= disp->format_modifiers[0] & (0xffull << 12); + } + *tile_mode = (uint32_t)(modifier & 0xF); *kind = (uint8_t)((modifier >> 12) & 0xFF); @@ -227,6 +234,16 @@ nouveau_framebuffer_get_layout(struct drm_framebuffer *fb, } } +static const u64 legacy_modifiers[] = { + DRM_FORMAT_MOD_NVIDIA...
2020 Jul 24
0
[PATCH v2] drm/nouveau: Accept 'legacy' format modifiers
...uveau_display *disp = nouveau_display(drm->dev); > BUG_ON(!tile_mode || !kind); > > + if ((modifier & (0xffull << 12)) == 0ull) { > + /* Legacy modifier. Translate to this device's 'kind.' */ > + modifier |= disp->format_modifiers[0] & (0xffull << 12); > + } I believe this should be moved into the != MOD_LINEAR case. > + > if (modifier == DRM_FORMAT_MOD_LINEAR) { > /* tile_mode will not be used in this case */ > *tile_mode = 0; > @@ -227,6 +233,16 @@...
2019 Dec 11
5
[PATCH 0/3] drm/nouveau: Support NVIDIA format modifiers
This series modifies the NV5x+ nouveau display backends to advertise appropriate format modifiers on their display planes in atomic mode setting blobs. Corresponding modifications to Mesa/userspace are available here: https://gitlab.freedesktop.org/cubanismo/mesa/tree/nouveau_work But those need a bit of cleanup before they're ready to submit. I've tested this on Tesla, Kepler, Pascal,
2020 Feb 05
3
[PATCH v3 0/3] drm/nouveau: Support NVIDIA format modifiers
This series modifies the NV5x+ nouveau display backends to advertise appropriate format modifiers on their display planes in atomic mode setting blobs. Corresponding modifications to Mesa/userspace are available on the Mesa-dev mailing list as the series: nouveau: Improved format modifier support I've tested this on Tesla, Kepler, Pascal, and Turing-class hardware using various formats
2020 Jul 30
2
[PATCH v3] drm/nouveau: Accept 'legacy' format modifiers
...uint32_t *tile_mode, uint8_t *kind) { + struct nouveau_display *disp = nouveau_display(drm->dev); BUG_ON(!tile_mode || !kind); + if ((modifier & (0xffull << 12)) == 0ull) { + /* Legacy modifier. Translate to this device's 'kind.' */ + modifier |= disp->format_modifiers[0] & (0xffull << 12); + } + if (modifier == DRM_FORMAT_MOD_LINEAR) { /* tile_mode will not be used in this case */ *tile_mode = 0; @@ -227,6 +233,16 @@ nouveau_framebuffer_get_layout(struct drm_framebuffer *fb, } } +static const u64 legacy_modifiers[] = { + DRM_FORMAT_MOD_NVI...
2020 Feb 10
3
[PATCH v5 0/3] drm/nouveau: Support NVIDIA format modifiers
This series modifies the NV5x+ nouveau display backends to advertise appropriate format modifiers on their display planes in atomic mode setting blobs. Corresponding modifications to Mesa/userspace are available on the Mesa-dev gitlab merge request 3724: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3724 I've tested this on Tesla, Kepler, Pascal, and Turing-class hardware using
2020 Feb 07
3
[PATCH v4 0/3] drm/nouveau: Support NVIDIA format modifiers
This series modifies the NV5x+ nouveau display backends to advertise appropriate format modifiers on their display planes in atomic mode setting blobs. Corresponding modifications to Mesa/userspace are available on the Mesa-dev gitlab merge request 3724: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3724 I've tested this on Tesla, Kepler, Pascal, and Turing-class hardware using
2019 Dec 11
0
[PATCH 3/3] drm/nouveau: Support NVIDIA format modifiers
...ouveau_drm *drm, + uint64_t modifier, + uint32_t *tile_mode, + uint8_t *kind) +{ + struct nouveau_display *disp = nouveau_display(drm->dev); + int mod; + + BUG_ON(!tile_mode || !kind); + + if (drm->client.device.info.chipset < 0x50) { + return -EINVAL; + } + + BUG_ON(!disp->format_modifiers); + + for (mod = 0; + (disp->format_modifiers[mod] != DRM_FORMAT_MOD_INVALID) && + (disp->format_modifiers[mod] != modifier); + mod++); + + if (disp->format_modifiers[mod] == DRM_FORMAT_MOD_INVALID) + return -EINVAL; + + if (modifier == DRM_FORMAT_MOD_LINEAR) { + /...
2020 Jul 27
2
[PATCH v2] drm/nouveau: Accept 'legacy' format modifiers
...nouveau_display(drm->dev); >> BUG_ON(!tile_mode || !kind); >> >> + if ((modifier & (0xffull << 12)) == 0ull) { >> + /* Legacy modifier. Translate to this device's 'kind.' */ >> + modifier |= disp->format_modifiers[0] & (0xffull << 12); >> + } > I believe this should be moved into the != MOD_LINEAR case. Yes, of course, thanks. I need to re-evaluate my testing yet again to make sure I hit that case too. Preparing a v3... Thanks, -James >> + >> if (modifier =...
2019 Dec 13
0
[PATCH 3/3] drm/nouveau: Support NVIDIA format modifiers
...s). Sadly 0x67/0x68 are higher > than 0x50 numerically, but are logically part of the nv4x generation. Good catch. I'll get this fixed and send out an updated patchset. Thanks, -James >> + return -EINVAL; >> + } >> + >> + BUG_ON(!disp->format_modifiers); >> + >> + for (mod = 0; >> + (disp->format_modifiers[mod] != DRM_FORMAT_MOD_INVALID) && >> + (disp->format_modifiers[mod] != modifier); >> + mod++); >> + >> + if (disp->format_modifiers[mod] ==...
2019 Dec 17
6
[PATCH v2 0/3] drm/nouveau: Support NVIDIA format modifiers
This series modifies the NV5x+ nouveau display backends to advertise appropriate format modifiers on their display planes in atomic mode setting blobs. Corresponding modifications to Mesa/userspace are available here: https://gitlab.freedesktop.org/cubanismo/mesa/tree/nouveau_work But those need a bit of cleanup before they're ready to submit. I've tested this on Tesla, Kepler, Pascal,
2020 Jul 29
2
[PATCH v2] drm/nouveau: Accept 'legacy' format modifiers
...BUG_ON(!tile_mode || !kind); > > >> > > >> + if ((modifier & (0xffull << 12)) == 0ull) { > > >> + /* Legacy modifier. Translate to this device's 'kind.' */ > > >> + modifier |= disp->format_modifiers[0] & (0xffull << 12); > > >> + } > > > I believe this should be moved into the != MOD_LINEAR case. > > > > Yes, of course, thanks. I need to re-evaluate my testing yet again to > > make sure I hit that case too. Preparing a v3... > > Go...
2020 Jul 30
0
[PATCH v3] drm/nouveau: Accept 'legacy' format modifiers
...t8_t *kind) > { > + struct nouveau_display *disp = nouveau_display(drm->dev); > BUG_ON(!tile_mode || !kind); > > + if ((modifier & (0xffull << 12)) == 0ull) { > + /* Legacy modifier. Translate to this device's 'kind.' */ > + modifier |= disp->format_modifiers[0] & (0xffull << 12); > + } > + > if (modifier == DRM_FORMAT_MOD_LINEAR) { > /* tile_mode will not be used in this case */ > *tile_mode = 0; Em. I thought Ben's suggestion was to move it under != MOD_LINEAR. I don't see it here. -- Kirill A. Shutemov
2020 Jul 29
0
[PATCH v2] drm/nouveau: Accept 'legacy' format modifiers
...dev); > >> BUG_ON(!tile_mode || !kind); > >> > >> + if ((modifier & (0xffull << 12)) == 0ull) { > >> + /* Legacy modifier. Translate to this device's 'kind.' */ > >> + modifier |= disp->format_modifiers[0] & (0xffull << 12); > >> + } > > I believe this should be moved into the != MOD_LINEAR case. > > Yes, of course, thanks. I need to re-evaluate my testing yet again to > make sure I hit that case too. Preparing a v3... Going to need something here in the...
2020 Jul 29
0
[PATCH v2] drm/nouveau: Accept 'legacy' format modifiers
...e_mode || !kind); > > > >> > > > >> + if ((modifier & (0xffull << 12)) == 0ull) { > > > >> + /* Legacy modifier. Translate to this device's 'kind.' */ > > > >> + modifier |= disp->format_modifiers[0] & (0xffull << 12); > > > >> + } > > > > I believe this should be moved into the != MOD_LINEAR case. > > > > > > Yes, of course, thanks. I need to re-evaluate my testing yet again to > > > make sure I hit that case too. Prepa...