mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 10:46:00 +01:00
fixes but kernel dies again :(
This commit is contained in:
parent
cac883a39c
commit
1cdd74c967
2 changed files with 8 additions and 5 deletions
|
@ -64,15 +64,19 @@ Aquamarine::CDRMDumbBuffer::CDRMDumbBuffer(const SAllocatorBufferParams& params,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// null the entire buffer so we dont get garbage
|
// set the entire buffer so we dont get garbage
|
||||||
memset(data, 0x00, size);
|
memset(data, 0xFF, size);
|
||||||
|
|
||||||
attrs.success = true;
|
attrs.success = true;
|
||||||
|
|
||||||
|
allocator->backend->log(AQ_LOG_DEBUG, std::format("DRM Dumb: Allocated a new buffer with drm id {}, size {} and format {}", idrmID, attrs.size, fourccToName(attrs.format)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Aquamarine::CDRMDumbBuffer::~CDRMDumbBuffer() {
|
Aquamarine::CDRMDumbBuffer::~CDRMDumbBuffer() {
|
||||||
events.destroy.emit();
|
events.destroy.emit();
|
||||||
|
|
||||||
|
TRACE(allocator->backend->log(AQ_LOG_TRACE, std::format("DRM Dumb: dropping buffer {}", idrmID)));
|
||||||
|
|
||||||
if (handle == 0)
|
if (handle == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -121,7 +125,7 @@ void Aquamarine::CDRMDumbBuffer::endDataPtr() {
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t Aquamarine::CDRMDumbBuffer::drmID() {
|
uint32_t Aquamarine::CDRMDumbBuffer::drmID() {
|
||||||
return handle;
|
return idrmID;
|
||||||
}
|
}
|
||||||
|
|
||||||
Aquamarine::CDRMDumbAllocator::~CDRMDumbAllocator() {
|
Aquamarine::CDRMDumbAllocator::~CDRMDumbAllocator() {
|
||||||
|
|
|
@ -1863,7 +1863,6 @@ void Aquamarine::CDRMFB::import() {
|
||||||
|
|
||||||
TRACE(backend->backend->log(AQ_LOG_TRACE, std::format("drm: new buffer {}", id)));
|
TRACE(backend->backend->log(AQ_LOG_TRACE, std::format("drm: new buffer {}", id)));
|
||||||
|
|
||||||
// FIXME: why does this implode when it doesnt on wlroots or kwin?
|
|
||||||
closeHandles();
|
closeHandles();
|
||||||
|
|
||||||
listeners.destroyBuffer = buffer->events.destroy.registerListener([this](std::any d) {
|
listeners.destroyBuffer = buffer->events.destroy.registerListener([this](std::any d) {
|
||||||
|
@ -1922,7 +1921,7 @@ void Aquamarine::CDRMFB::drop() {
|
||||||
|
|
||||||
dropped = true;
|
dropped = true;
|
||||||
|
|
||||||
if (!id)
|
if (!id || buffer->drmID() /* drmID means the buffer manages itself */)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
closeHandles();
|
closeHandles();
|
||||||
|
|
Loading…
Reference in a new issue