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@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-5-kraxel@redhat.com
Šī revīzija ir iekļauta:
@@ -77,7 +77,10 @@ static int bochs_crtc_mode_set(struct drm_crtc *crtc,
|
||||
struct bochs_device *bochs =
|
||||
container_of(crtc, struct bochs_device, crtc);
|
||||
|
||||
bochs_hw_setmode(bochs, mode);
|
||||
if (WARN_ON(crtc->primary->fb == NULL))
|
||||
return -EINVAL;
|
||||
|
||||
bochs_hw_setmode(bochs, mode, crtc->primary->fb->format);
|
||||
bochs_crtc_mode_set_base(crtc, x, y, old_fb);
|
||||
return 0;
|
||||
}
|
||||
@@ -127,7 +130,8 @@ static const struct drm_crtc_helper_funcs bochs_helper_funcs = {
|
||||
};
|
||||
|
||||
static const uint32_t bochs_formats[] = {
|
||||
DRM_FORMAT_HOST_XRGB8888,
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_BGRX8888,
|
||||
};
|
||||
|
||||
static struct drm_plane *bochs_primary_plane(struct drm_device *dev)
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user