KWin
Loading...
Searching...
No Matches
drm_crtc.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2016 Roman Gilg <subdiff@gmail.com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9#pragma once
10
11#include "drm_object.h"
12
13#include <QPoint>
14#include <memory>
15
16namespace KWin
17{
18
19class DrmBackend;
20class DrmFramebuffer;
21class GammaRamp;
22class DrmGpu;
23class DrmPlane;
24
25class DrmCrtc : public DrmObject
26{
27public:
29
30 void disable(DrmAtomicCommit *commit) override;
31 bool updateProperties() override;
32
33 int pipeIndex() const;
34 int gammaRampSize() const;
35 DrmPlane *primaryPlane() const;
36 DrmPlane *cursorPlane() const;
37 drmModeModeInfo queryCurrentMode();
38
39 std::shared_ptr<DrmFramebuffer> current() const;
40 void setCurrent(const std::shared_ptr<DrmFramebuffer> &buffer);
42
51
52private:
54 std::shared_ptr<DrmFramebuffer> m_currentBuffer;
55 int m_pipeIndex;
56 DrmPlane *m_primaryPlane;
57 DrmPlane *m_cursorPlane;
58};
59
60}
DrmProperty active
Definition drm_crtc.h:44
void releaseCurrentBuffer()
Definition drm_crtc.cpp:103
DrmProperty modeId
Definition drm_crtc.h:43
std::shared_ptr< DrmFramebuffer > current() const
Definition drm_crtc.cpp:66
DrmProperty gammaLutSize
Definition drm_crtc.h:47
DrmCrtc(DrmGpu *gpu, uint32_t crtcId, int pipeIndex, DrmPlane *primaryPlane, DrmPlane *cursorPlane)
Definition drm_crtc.cpp:20
DrmProperty ctm
Definition drm_crtc.h:48
int pipeIndex() const
Definition drm_crtc.cpp:61
DrmPlane * primaryPlane() const
Definition drm_crtc.cpp:87
DrmProperty vrrEnabled
Definition drm_crtc.h:45
DrmProperty gammaLut
Definition drm_crtc.h:46
void disable(DrmAtomicCommit *commit) override
Definition drm_crtc.cpp:97
DrmProperty degammaLutSize
Definition drm_crtc.h:50
DrmProperty degammaLut
Definition drm_crtc.h:49
int gammaRampSize() const
Definition drm_crtc.cpp:76
DrmPlane * cursorPlane() const
Definition drm_crtc.cpp:92
drmModeModeInfo queryCurrentMode()
Definition drm_crtc.cpp:55
void setCurrent(const std::shared_ptr< DrmFramebuffer > &buffer)
Definition drm_crtc.cpp:71
bool updateProperties() override
Definition drm_crtc.cpp:37
DrmGpu * gpu() const
std::unique_ptr< T, DrmDeleter< T > > DrmUniquePtr