aboutsummaryrefslogtreecommitdiff
path: root/include/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-05-06 11:58:17 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-05-11 14:06:11 +0000
commite646d882cf4949d290fff2ba3b7ae4c124f6f13d (patch)
treec762ea0e4186c9ea655275535d7fcb26d17bc02b /include/backend/drm
parentfa9b61004b79460357556b67e95ad2740bf12751 (diff)
backend/drm: fetch EDID manufacturer from udev_hwdb
Maintaining our internal table up-to-date is tedious: one needs to manually go through the PnP ID registry [1] and check whether we're missing any entry. udev_hwdb already has an API to fetch a manufacturer name from its PnP ID. Use that instead. [1]: https://uefi.org/pnp_id_list
Diffstat (limited to 'include/backend/drm')
-rw-r--r--include/backend/drm/drm.h1
-rw-r--r--include/backend/drm/util.h6
2 files changed, 4 insertions, 3 deletions
diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h
index c5d3358f..dbc47364 100644
--- a/include/backend/drm/drm.h
+++ b/include/backend/drm/drm.h
@@ -58,6 +58,7 @@ struct wlr_drm_backend {
const struct wlr_drm_interface *iface;
clockid_t clock;
bool addfb2_modifiers;
+ struct udev_hwdb *hwdb;
int fd;
char *name;
diff --git a/include/backend/drm/util.h b/include/backend/drm/util.h
index b4cdee7d..323894b5 100644
--- a/include/backend/drm/util.h
+++ b/include/backend/drm/util.h
@@ -2,15 +2,15 @@
#define BACKEND_DRM_UTIL_H
#include <stdint.h>
-#include <wlr/types/wlr_output.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
+struct wlr_drm_connector;
+
// Calculates a more accurate refresh rate (mHz) than what mode itself provides
int32_t calculate_refresh_rate(const drmModeModeInfo *mode);
// Populates the make/model/phys_{width,height} of output from the edid data
-void parse_edid(struct wlr_output *restrict output, size_t len,
- const uint8_t *data);
+void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data);
// Returns the string representation of a DRM output type
const char *conn_get_name(uint32_t type_id);