mutter/src/backends/native
Hans de Goede 73db35c53c kms: Fix meta_kms_crtc_read_state gamma table memory leak
Before this commit meta_kms_crtc_read_state was overwriting the
entire MetaKmsCrtcState struct stored in crtc->current_state including
the gamma (sub)struct.

This effectively zero-s the gamma struct each time before calling
read_gamma_state, setting the pointers where the previous gamma values
were stored to NULL without freeing the memory. Luckily this zero-ing
also sets gamma.size to 0, causing read_gamma_state to re-alloc the
arrays on each meta_kms_crtc_update_state call. But this does mean that
were leaking the old gamma arrays on each meta_kms_crtc_update_state call.

This commit fixes this by making meta_kms_crtc_read_state only overwrite
the other values in the MetaKmsCrtcState struct and leaving the gamma
sub-struct alone, this will make read_gamma_state correctly re-use the
gamma tables if the gamma table size is unchanged; or re-alloc them
(freeing the old ones) if the size has changed, fixing the memory leak.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/713
2019-08-15 20:38:28 +00:00
..
dbus-utils.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
dbus-utils.h launcher: Replace mutter-launch with logind integration 2014-05-19 15:09:23 -04:00
gen-default-modes.py build: Don't hardcode the path of python3 2018-11-18 14:25:35 +08:00
meta-backend-native-private.h backends/native: Implement support for pointer barriers 2015-01-19 02:27:59 -08:00
meta-backend-native-types.h udev: Add helpers to list DRM devices 2019-06-20 13:31:55 +00:00
meta-backend-native.c backends: Move numlock persistence handling here 2019-06-24 18:24:57 +02:00
meta-backend-native.h backends/native: Add basic KMS abstraction building blocks 2019-06-20 13:31:55 +00:00
meta-barrier-native.c Use a consistent style for enum braces 2019-02-28 09:31:01 +01:00
meta-barrier-native.h Use G_DECLARE_DERIVABLE/FINAL_TYPE on some types 2018-12-21 19:48:50 +00:00
meta-clutter-backend-native.c Add some gtk-doc comments. 2019-01-06 21:57:16 +01:00
meta-clutter-backend-native.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-crtc-kms.c backends/native: Add some KMS debug logging 2019-06-20 13:31:56 +00:00
meta-crtc-kms.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-cursor-renderer-native.c backend: Move GPU ownership from the monitor manager to the backend 2019-06-20 13:31:55 +00:00
meta-cursor-renderer-native.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-drm-buffer-dumb.c drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-drm-buffer-dumb.h drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-drm-buffer-gbm.c drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-drm-buffer-gbm.h drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-drm-buffer.c drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-drm-buffer.h drm-buffer: Make the "types" actual types 2019-05-21 14:55:38 +00:00
meta-gpu-kms.c backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-gpu-kms.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-input-settings-native.c Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-input-settings-native.h Clean up include macros mess 2018-11-06 17:17:36 +01:00
meta-kms-connector-private.h output/kms: Outsource connector state fetching to MetaKmsConnector 2019-06-20 13:31:56 +00:00
meta-kms-connector.c backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-connector.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-crtc-private.h crtc/kms: Outsource CRTC state fetching to MetaKmsCrtc 2019-06-20 13:31:55 +00:00
meta-kms-crtc.c kms: Fix meta_kms_crtc_read_state gamma table memory leak 2019-08-15 20:38:28 +00:00
meta-kms-crtc.h kms: Remove unused fields from MetaKmsCrtcState struct 2019-08-15 20:38:28 +00:00
meta-kms-device-private.h crtc/kms: Outsource CRTC state fetching to MetaKmsCrtc 2019-06-20 13:31:55 +00:00
meta-kms-device.c kms-impl-device: Fail if we can't enable universal planes 2019-07-01 11:55:47 +02:00
meta-kms-device.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-impl-device.c kms-impl-device: Fail up front if we can't retrieve DRM resources 2019-07-01 11:56:08 +02:00
meta-kms-impl-device.h kms-impl-device: Fail if we can't enable universal planes 2019-07-01 11:55:47 +02:00
meta-kms-impl-simple.c monitor-manager/kms: Use KMS abstraction to get and set CRTC gamma 2019-06-24 13:36:10 +00:00
meta-kms-impl-simple.h backends/native: Add basic KMS abstraction building blocks 2019-06-20 13:31:55 +00:00
meta-kms-impl.c backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-impl.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-page-flip-private.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-page-flip.c backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-plane.c kms-plane: Include <drm_fourcc.h> 2019-06-28 13:25:15 -03:00
meta-kms-plane.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-private.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-types.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-update-private.h monitor-manager/kms: Use KMS abstraction to get and set CRTC gamma 2019-06-24 13:36:10 +00:00
meta-kms-update.c monitor-manager/kms: Use KMS abstraction to get and set CRTC gamma 2019-06-24 13:36:10 +00:00
meta-kms-update.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-kms-utils.c backend/native: Move some KMS utilities to its own file 2019-06-20 13:31:56 +00:00
meta-kms-utils.h backend/native: Move some KMS utilities to its own file 2019-06-20 13:31:56 +00:00
meta-kms.c kms-update: Seal updates when posting them 2019-06-20 13:31:56 +00:00
meta-kms.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-launcher.c launcher: Explicitly look up object path for seat 2019-05-21 16:43:09 +02:00
meta-launcher.h backends/native: Move KMS fd management to monitor manager 2017-10-05 16:18:43 -04:00
meta-monitor-manager-kms.c monitor-manager/kms: Use KMS abstraction to get and set CRTC gamma 2019-06-24 13:36:10 +00:00
meta-monitor-manager-kms.h backends/native: Move primary_gpu into MetaRendererNative 2019-01-13 10:30:44 +00:00
meta-output-kms.c backends/native: Add some KMS debug logging 2019-06-20 13:31:56 +00:00
meta-output-kms.h backend/native: Add and use transactional KMS API 2019-06-20 13:31:56 +00:00
meta-renderer-native-gles3.c egl: Introduce meta_egl_create_dmabuf_image 2019-07-10 08:15:02 +00:00
meta-renderer-native-gles3.h renderer/native: remove meta_renderer_native_gles3_read_pixels 2018-11-19 22:53:13 +00:00
meta-renderer-native.c dma-buf: Mark DMA-BUF textures as paint-only 2019-07-18 14:09:22 +00:00
meta-renderer-native.h renderer/native: Queue mode reset from new rebuild_views vfunc 2019-06-27 19:08:01 +02:00
meta-stage-native.c renderer/native: Queue mode reset from new rebuild_views vfunc 2019-06-27 19:08:01 +02:00
meta-stage-native.h backends/native: Stop supporting stage views being disabled 2017-10-05 18:08:09 -04:00
meta-udev.c udev: Add device-removed signal 2019-08-15 20:38:28 +00:00
meta-udev.h backend: Move GPU ownership from the monitor manager to the backend 2019-06-20 13:31:55 +00:00