search for: drm_format_bgrx8888

Displaying 20 results from an estimated 31 matches for "drm_format_bgrx8888".

Did you mean: drm_format_bgra8888
2017 Apr 03
2
[PATCH 1/2] drm: virtio: add virtio_gpu_translate_format
...* 4; mode_cmd.pixel_format = drm_mode_legacy_fb_format(32, 24); - switch (mode_cmd.pixel_format) { -#ifdef __BIG_ENDIAN - case DRM_FORMAT_XRGB8888: - format = VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM; - break; - case DRM_FORMAT_ARGB8888: - format = VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM; - break; - case DRM_FORMAT_BGRX8888: - format = VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM; - break; - case DRM_FORMAT_BGRA8888: - format = VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM; - break; - case DRM_FORMAT_RGBX8888: - format = VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM; - break; - case DRM_FORMAT_RGBA8888: - format = VIRTIO_GPU_FORMAT_R8G8B8A8_UNORM;...
2017 Apr 03
2
[PATCH 1/2] drm: virtio: add virtio_gpu_translate_format
...* 4; mode_cmd.pixel_format = drm_mode_legacy_fb_format(32, 24); - switch (mode_cmd.pixel_format) { -#ifdef __BIG_ENDIAN - case DRM_FORMAT_XRGB8888: - format = VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM; - break; - case DRM_FORMAT_ARGB8888: - format = VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM; - break; - case DRM_FORMAT_BGRX8888: - format = VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM; - break; - case DRM_FORMAT_BGRA8888: - format = VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM; - break; - case DRM_FORMAT_RGBX8888: - format = VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM; - break; - case DRM_FORMAT_RGBA8888: - format = VIRTIO_GPU_FORMAT_R8G8B8A8_UNORM;...
2017 Apr 07
2
DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)
...drm drivers (at least the ones used on both big and little endian > guests) support only 32 bpp + depth 24 formats. And for these we don't > need a "other endian" flag because we have fourcc codes for all sorts of > byte orders (i.e. DRM_FORMAT_XRGB8888 little endian == > DRM_FORMAT_BGRX8888 big endian). Yeah, those could be handled without the flag. But when mixed with any other format the code would look a bit weird IMO. So my idea with the flag was that if you display is big endian you always have the flag, and then you don't have to think so much which way the bytes go for eac...
2017 Apr 07
2
DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)
...drm drivers (at least the ones used on both big and little endian > guests) support only 32 bpp + depth 24 formats. And for these we don't > need a "other endian" flag because we have fourcc codes for all sorts of > byte orders (i.e. DRM_FORMAT_XRGB8888 little endian == > DRM_FORMAT_BGRX8888 big endian). Yeah, those could be handled without the flag. But when mixed with any other format the code would look a bit weird IMO. So my idea with the flag was that if you display is big endian you always have the flag, and then you don't have to think so much which way the bytes go for eac...
2017 Apr 03
0
[PATCH 1/2] drm: virtio: add virtio_gpu_translate_format
..._format(32, 24); > > - switch (mode_cmd.pixel_format) { > -#ifdef __BIG_ENDIAN > - case DRM_FORMAT_XRGB8888: > - format = VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM; > - break; > - case DRM_FORMAT_ARGB8888: > - format = VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM; > - break; > - case DRM_FORMAT_BGRX8888: > - format = VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM; > - break; > - case DRM_FORMAT_BGRA8888: > - format = VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM; > - break; > - case DRM_FORMAT_RGBX8888: > - format = VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM; > - break; > - case DRM_FORMAT_RGBA8888: &...
2018 Sep 19
0
[PATCH v3 4/5] drm/bochs: support changing byteorder at mode set time
Add bochs_hw_set_*_endian() helper functions, to set the framebuffer byteorder at mode set time. Support both DRM_FORMAT_XRGB8888 and DRM_FORMAT_BGRX8888 framebuffer formats, no matter what the native machine byte order is. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/bochs/bochs.h | 4 ++- drivers/gpu/drm/bochs/bochs_fbdev.c | 3 +- drivers/gpu/drm/bochs/bochs_hw.c | 64 +++++++++++++++++++++++++++++----...
2017 Apr 07
0
DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)
...t the ones used on both big and little endian > > guests) support only 32 bpp + depth 24 formats. And for these we don't > > need a "other endian" flag because we have fourcc codes for all sorts of > > byte orders (i.e. DRM_FORMAT_XRGB8888 little endian == > > DRM_FORMAT_BGRX8888 big endian). > > Yeah, those could be handled without the flag. But when mixed with any > other format the code would look a bit weird IMO. Well, there is a reason only the 32bpp formats are supported. With those you just adjust your color shifts and you are done. No need to actually b...
2018 Dec 19
0
[PATCH 14/14] drm/bochs: move remaining fb bits to kms
...----------------------------------------- */ - -static struct drm_framebuffer * -bochs_gem_fb_create(struct drm_device *dev, struct drm_file *file, - const struct drm_mode_fb_cmd2 *mode_cmd) -{ - if (mode_cmd->pixel_format != DRM_FORMAT_XRGB8888 && - mode_cmd->pixel_format != DRM_FORMAT_BGRX8888) - return ERR_PTR(-EINVAL); - - return drm_gem_fb_create(dev, file, mode_cmd); -} - -const struct drm_mode_config_funcs bochs_mode_funcs = { - .fb_create = bochs_gem_fb_create, - .atomic_check = drm_atomic_helper_check, - .atomic_commit = drm_atomic_helper_commit, -}; diff --git a/drivers/gpu/drm/...
2017 Apr 06
2
DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)
On Thu, Apr 06, 2017 at 08:27:47PM +0300, Ville Syrj?l? wrote: > On Thu, Apr 06, 2017 at 10:29:43AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > static const uint32_t virtio_gpu_cursor_formats[] = { > > > > +#ifdef __BIG_ENDIAN > > > > + DRM_FORMAT_BGRA8888, > > > > +#else > > > > DRM_FORMAT_ARGB8888, > >
2017 Apr 06
2
DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)
On Thu, Apr 06, 2017 at 08:27:47PM +0300, Ville Syrj?l? wrote: > On Thu, Apr 06, 2017 at 10:29:43AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > static const uint32_t virtio_gpu_cursor_formats[] = { > > > > +#ifdef __BIG_ENDIAN > > > > + DRM_FORMAT_BGRA8888, > > > > +#else > > > > DRM_FORMAT_ARGB8888, > >
2018 Sep 05
0
[PATCH v2 6/6] drm/virtio: fix DRM_FORMAT_* handling
...rtgpu_plane.c index dc5b5b2b7a..3221d50b9a 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -28,22 +28,11 @@ #include <drm/drm_atomic_helper.h> static const uint32_t virtio_gpu_formats[] = { - DRM_FORMAT_XRGB8888, - DRM_FORMAT_ARGB8888, - DRM_FORMAT_BGRX8888, - DRM_FORMAT_BGRA8888, - DRM_FORMAT_RGBX8888, - DRM_FORMAT_RGBA8888, - DRM_FORMAT_XBGR8888, - DRM_FORMAT_ABGR8888, + DRM_FORMAT_HOST_XRGB8888, }; static const uint32_t virtio_gpu_cursor_formats[] = { -#ifdef __BIG_ENDIAN - DRM_FORMAT_BGRA8888, -#else - DRM_FORMAT_ARGB8888, -#endif + DRM_FORMAT...
2018 Sep 19
0
[PATCH v3 5/5] drm/virtio: fix DRM_FORMAT_* handling
...rtgpu_plane.c index 88f2fb8c61..a84ff56507 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -28,22 +28,11 @@ #include <drm/drm_atomic_helper.h> static const uint32_t virtio_gpu_formats[] = { - DRM_FORMAT_XRGB8888, - DRM_FORMAT_ARGB8888, - DRM_FORMAT_BGRX8888, - DRM_FORMAT_BGRA8888, - DRM_FORMAT_RGBX8888, - DRM_FORMAT_RGBA8888, - DRM_FORMAT_XBGR8888, - DRM_FORMAT_ABGR8888, + DRM_FORMAT_HOST_XRGB8888, }; static const uint32_t virtio_gpu_cursor_formats[] = { -#ifdef __BIG_ENDIAN - DRM_FORMAT_BGRA8888, -#else - DRM_FORMAT_ARGB8888, -#endif + DRM_FORMAT...
2018 Sep 03
0
[PATCH 5/5] drm/virtio: fix DRM_FORMAT_* handling
...rtgpu_plane.c index dc5b5b2b7a..3221d50b9a 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -28,22 +28,11 @@ #include <drm/drm_atomic_helper.h> static const uint32_t virtio_gpu_formats[] = { - DRM_FORMAT_XRGB8888, - DRM_FORMAT_ARGB8888, - DRM_FORMAT_BGRX8888, - DRM_FORMAT_BGRA8888, - DRM_FORMAT_RGBX8888, - DRM_FORMAT_RGBA8888, - DRM_FORMAT_XBGR8888, - DRM_FORMAT_ABGR8888, + DRM_FORMAT_HOST_XRGB8888, }; static const uint32_t virtio_gpu_cursor_formats[] = { -#ifdef __BIG_ENDIAN - DRM_FORMAT_BGRA8888, -#else - DRM_FORMAT_ARGB8888, -#endif + DRM_FORMAT...
2017 Apr 07
0
DRM_FORMAT_* byte order (was: Re: [PATCH] drm: virtio: fix virtio_gpu_cursor_formats)
...;t buy us much. The drm drivers (at least the ones used on both big and little endian guests) support only 32 bpp + depth 24 formats. And for these we don't need a "other endian" flag because we have fourcc codes for all sorts of byte orders (i.e. DRM_FORMAT_XRGB8888 little endian == DRM_FORMAT_BGRX8888 big endian). The DRM_FORMAT_BIG_ENDIAN flags also seems not be used anywhere in the code base (except in some format printing debug code ...). cheers, Gerd
2017 Apr 24
0
[PATCH 6/6] drm: fourcc byteorder: virtio restrict to XRGB8888
...irtgpu_plane.c index f40ffc9a70..3a4498a223 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -28,14 +28,7 @@ #include <drm/drm_atomic_helper.h> static const uint32_t virtio_gpu_formats[] = { - DRM_FORMAT_XRGB8888, - DRM_FORMAT_ARGB8888, - DRM_FORMAT_BGRX8888, - DRM_FORMAT_BGRA8888, - DRM_FORMAT_RGBX8888, - DRM_FORMAT_RGBA8888, - DRM_FORMAT_XBGR8888, - DRM_FORMAT_ABGR8888, + DRM_FORMAT_CPU_XRGB8888, }; static const uint32_t virtio_gpu_cursor_formats[] = { -- 2.9.3
2017 Apr 24
0
[PATCH 5/6] drm: fourcc byteorder: adapt virtio to drm_mode_legacy_fb_format update
...uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc) uint32_t format; switch (drm_fourcc) { -#ifdef __BIG_ENDIAN - case DRM_FORMAT_XRGB8888: - format = VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM; - break; - case DRM_FORMAT_ARGB8888: - format = VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM; - break; - case DRM_FORMAT_BGRX8888: - format = VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM; - break; - case DRM_FORMAT_BGRA8888: - format = VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM; - break; - case DRM_FORMAT_RGBX8888: - format = VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM; - break; - case DRM_FORMAT_RGBA8888: - format = VIRTIO_GPU_FORMAT_R8G8B8A8_UNORM;...
2019 Jul 03
0
[PATCH 4/5] drm/bochs: Use shadow buffer for bochs framebuffer console
...drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index bc19dbd531ef..47fab4852483 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -172,7 +172,7 @@ bochs_gem_fb_create(struct drm_device *dev, struct drm_file *file, mode_cmd->pixel_format != DRM_FORMAT_BGRX8888) return ERR_PTR(-EINVAL); - return drm_gem_fb_create(dev, file, mode_cmd); + return drm_gem_fb_create_with_dirty(dev, file, mode_cmd); } const struct drm_mode_config_funcs bochs_mode_funcs = { -- 2.21.0
2017 Apr 24
0
[PATCH 6/6] drm: fourcc byteorder: virtio restrict to XRGB8888
...irtgpu_plane.c index f40ffc9a70..3a4498a223 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -28,14 +28,7 @@ #include <drm/drm_atomic_helper.h> static const uint32_t virtio_gpu_formats[] = { - DRM_FORMAT_XRGB8888, - DRM_FORMAT_ARGB8888, - DRM_FORMAT_BGRX8888, - DRM_FORMAT_BGRA8888, - DRM_FORMAT_RGBX8888, - DRM_FORMAT_RGBA8888, - DRM_FORMAT_XBGR8888, - DRM_FORMAT_ABGR8888, + DRM_FORMAT_CPU_XRGB8888, }; static const uint32_t virtio_gpu_cursor_formats[] = { -- 2.9.3
2017 Apr 24
0
[PATCH 5/6] drm: fourcc byteorder: adapt virtio to drm_mode_legacy_fb_format update
...uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc) uint32_t format; switch (drm_fourcc) { -#ifdef __BIG_ENDIAN - case DRM_FORMAT_XRGB8888: - format = VIRTIO_GPU_FORMAT_X8R8G8B8_UNORM; - break; - case DRM_FORMAT_ARGB8888: - format = VIRTIO_GPU_FORMAT_A8R8G8B8_UNORM; - break; - case DRM_FORMAT_BGRX8888: - format = VIRTIO_GPU_FORMAT_B8G8R8X8_UNORM; - break; - case DRM_FORMAT_BGRA8888: - format = VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM; - break; - case DRM_FORMAT_RGBX8888: - format = VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM; - break; - case DRM_FORMAT_RGBA8888: - format = VIRTIO_GPU_FORMAT_R8G8B8A8_UNORM;...
2018 Dec 19
0
[PATCH 05/14] drm/bochs: atomic: switch planes to atomic, wire up helpers.
...drm_atomic_helper_crtc_reset, + .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, }; static const struct drm_crtc_helper_funcs bochs_helper_funcs = { @@ -169,6 +174,59 @@ static const uint32_t bochs_formats[] = { DRM_FORMAT_BGRX8888, }; +static void bochs_plane_atomic_update(struct drm_plane *plane, + struct drm_plane_state *old_state) +{ + struct bochs_device *bochs = plane->dev->dev_private; + struct bochs_bo *bo; + + if (!plane->state->fb) + return; + bo = gem_to_bochs_bo(plane->state->fb->...