mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
backend/drm: remove mode arg from drm_connector_init_renderer
This is now unused.
This commit is contained in:
parent
31082a0554
commit
7aba881c47
1 changed files with 8 additions and 8 deletions
|
@ -657,7 +657,7 @@ static bool drm_connector_pageflip_renderer(struct wlr_drm_connector *conn,
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
||||||
const struct wlr_output_state *state, struct wlr_drm_mode *mode) {
|
const struct wlr_output_state *state) {
|
||||||
struct wlr_drm_backend *drm = conn->backend;
|
struct wlr_drm_backend *drm = conn->backend;
|
||||||
|
|
||||||
if (conn->state != WLR_DRM_CONN_CONNECTED &&
|
if (conn->state != WLR_DRM_CONN_CONNECTED &&
|
||||||
|
@ -675,8 +675,11 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
||||||
}
|
}
|
||||||
struct wlr_drm_plane *plane = crtc->primary;
|
struct wlr_drm_plane *plane = crtc->primary;
|
||||||
|
|
||||||
int width = mode->wlr_mode.width;
|
drmModeModeInfo mode = {0};
|
||||||
int height = mode->wlr_mode.height;
|
drm_connector_state_mode(conn, state, &mode);
|
||||||
|
|
||||||
|
int width = mode.hdisplay;
|
||||||
|
int height = mode.vdisplay;
|
||||||
uint32_t format = DRM_FORMAT_ARGB8888;
|
uint32_t format = DRM_FORMAT_ARGB8888;
|
||||||
|
|
||||||
bool modifiers = drm->addfb2_modifiers;
|
bool modifiers = drm->addfb2_modifiers;
|
||||||
|
@ -772,8 +775,7 @@ bool drm_connector_set_mode(struct wlr_drm_connector *conn,
|
||||||
"Modesetting with '%" PRId32 "x%" PRId32 "@%" PRId32 "mHz'",
|
"Modesetting with '%" PRId32 "x%" PRId32 "@%" PRId32 "mHz'",
|
||||||
wlr_mode->width, wlr_mode->height, wlr_mode->refresh);
|
wlr_mode->width, wlr_mode->height, wlr_mode->refresh);
|
||||||
|
|
||||||
struct wlr_drm_mode *mode = (struct wlr_drm_mode *)wlr_mode;
|
if (!drm_connector_init_renderer(conn, state)) {
|
||||||
if (!drm_connector_init_renderer(conn, state, mode)) {
|
|
||||||
wlr_drm_conn_log(conn, WLR_ERROR,
|
wlr_drm_conn_log(conn, WLR_ERROR,
|
||||||
"Failed to initialize renderer for plane");
|
"Failed to initialize renderer for plane");
|
||||||
return false;
|
return false;
|
||||||
|
@ -1211,13 +1213,11 @@ static void realloc_crtcs(struct wlr_drm_backend *drm) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_drm_mode *mode =
|
|
||||||
(struct wlr_drm_mode *)conn->output.current_mode;
|
|
||||||
struct wlr_output_state state = {
|
struct wlr_output_state state = {
|
||||||
.committed = WLR_OUTPUT_STATE_ENABLED,
|
.committed = WLR_OUTPUT_STATE_ENABLED,
|
||||||
.enabled = true,
|
.enabled = true,
|
||||||
};
|
};
|
||||||
if (!drm_connector_init_renderer(conn, &state, mode)) {
|
if (!drm_connector_init_renderer(conn, &state)) {
|
||||||
wlr_drm_conn_log(conn, WLR_ERROR, "Failed to initialize renderer");
|
wlr_drm_conn_log(conn, WLR_ERROR, "Failed to initialize renderer");
|
||||||
wlr_output_update_enabled(&conn->output, false);
|
wlr_output_update_enabled(&conn->output, false);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue