crtc-kms: Make KMS CRTC mode a type inheriting MetaCrtcMode
It carries the drmModeModeInfo copy in it's instance struct, instead of the `driver_private` it was using before. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1287 This version of the commit includes fixes from: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1305
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "backends/native/meta-kms-connector.h"
|
||||
#include "backends/native/meta-kms-utils.h"
|
||||
#include "backends/native/meta-crtc-kms.h"
|
||||
#include "backends/native/meta-crtc-mode-kms.h"
|
||||
|
||||
#include "meta-default-modes.h"
|
||||
|
||||
@@ -153,7 +154,10 @@ add_common_modes (MetaOutputInfo *output_info,
|
||||
|
||||
for (i = 0; i < output_info->n_modes; i++)
|
||||
{
|
||||
drm_mode = output_info->modes[i]->driver_private;
|
||||
MetaCrtcMode *crtc_mode = output_info->modes[i];
|
||||
MetaCrtcModeKms *crtc_mode_kms = META_CRTC_MODE_KMS (crtc_mode);
|
||||
|
||||
drm_mode = meta_crtc_mode_kms_get_drm_mode (crtc_mode_kms);
|
||||
refresh_rate = meta_calculate_drm_mode_refresh_rate (drm_mode);
|
||||
max_hdisplay = MAX (max_hdisplay, drm_mode->hdisplay);
|
||||
max_vdisplay = MAX (max_vdisplay, drm_mode->vdisplay);
|
||||
|
Reference in New Issue
Block a user