diff options
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/drm.c | 6 | ||||
-rw-r--r-- | backend/drm/renderer.c | 2 | ||||
-rw-r--r-- | backend/drm/util.c | 6 |
3 files changed, 11 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index dd247998..9fcf2ad7 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -634,8 +634,10 @@ static bool wlr_drm_connector_move_cursor(struct wlr_output *output, struct wlr_box transformed_box; wlr_output_transform_apply_to_box(transform, &box, &transformed_box); - transformed_box.x -= plane->cursor_hotspot_x; - transformed_box.y -= plane->cursor_hotspot_y; + if (plane != NULL) { + transformed_box.x -= plane->cursor_hotspot_x; + transformed_box.y -= plane->cursor_hotspot_y; + } return drm->iface->crtc_move_cursor(drm, conn->crtc, transformed_box.x, transformed_box.y); diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index d53acaa8..87064914 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -14,7 +14,7 @@ #include <wlr/render/gles2.h> #include <wlr/render.h> #include "backend/drm/drm.h" -#include "render/glapi.h" +#include "glapi.h" bool wlr_drm_renderer_init(struct wlr_drm_backend *drm, struct wlr_drm_renderer *renderer) { diff --git a/backend/drm/util.c b/backend/drm/util.c index c27d7b67..25256343 100644 --- a/backend/drm/util.c +++ b/backend/drm/util.c @@ -93,6 +93,12 @@ void parse_edid(struct wlr_output *restrict output, size_t len, const uint8_t *d uint16_t id = (data[8] << 8) | data[9]; snprintf(output->make, sizeof(output->make), "%s", get_manufacturer(id)); + uint16_t model = data[10] | (data[11] << 8); + snprintf(output->model, sizeof(output->model), "0x%04X", model); + + uint32_t serial = data[12] | (data[13] << 8) | (data[14] << 8) | (data[15] << 8); + snprintf(output->serial, sizeof(output->serial), "0x%08X", serial); + output->phys_width = ((data[68] & 0xf0) << 4) | data[66]; output->phys_height = ((data[68] & 0x0f) << 8) | data[67]; |