Skip to content

Commit

Permalink
drm: Fix not locking wlserver around wlserver_set_output_info
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Oct 5, 2023
1 parent 434ca2b commit 029f06f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/drm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ inline uint64_t drm_calc_s31_32(float val)
uint64_t sign_part : 1;
} s31_32_bits;
uint64_t s31_32;
} color;
} color;4

color.s31_32_bits.sign_part = val < 0 ? 1 : 0;
color.s31_32_bits.integral = uint64_t( integral );
Expand Down Expand Up @@ -1166,7 +1166,9 @@ static bool setup_best_connector(struct drm_t *drm, bool force, bool initial)
const struct wlserver_output_info wlserver_output_info = {
.description = "Virtual screen",
};
wlserver_lock();
wlserver_set_output_info(&wlserver_output_info);
wlserver_unlock();
return true;
}

Expand Down Expand Up @@ -1217,7 +1219,9 @@ static bool setup_best_connector(struct drm_t *drm, bool force, bool initial)
.phys_width = (int) best->connector->mmWidth,
.phys_height = (int) best->connector->mmHeight,
};
wlserver_lock();
wlserver_set_output_info(&wlserver_output_info);
wlserver_unlock();

if (!initial)
create_patched_edid(best->edid_data.data(), best->edid_data.size(), drm, best);
Expand Down

0 comments on commit 029f06f

Please sign in to comment.