aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Duong <joshuaduong@google.com>2024-02-13 22:50:33 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2024-02-13 22:50:33 +0000
commitbc210e3c21ed2d3c1255a1b0db9a4e556ad5f734 (patch)
treeb91f901c6835bec5d867addc42d6c0732da65d09
parenta7fbbf9b93b41e40437727ff9674f320f46af04a (diff)
parent92df735b5e394a4ebb74fbbaf410c3a564a35e9d (diff)
downloadgoldfish-opengl-bc210e3c21ed2d3c1255a1b0db9a4e556ad5f734.tar.gz
Fix gcar boot. am: 92df735b5e
Original change: https://android-review.googlesource.com/c/device/generic/goldfish-opengl/+/2961922 Change-Id: I9f8169a51731ebf104cb522ac55673302eb33daa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--system/hwc3/HostFrameComposer.cpp15
-rw-r--r--system/hwc3/HostFrameComposer.h3
2 files changed, 8 insertions, 10 deletions
diff --git a/system/hwc3/HostFrameComposer.cpp b/system/hwc3/HostFrameComposer.cpp
index d440b880..8f232dcc 100644
--- a/system/hwc3/HostFrameComposer.cpp
+++ b/system/hwc3/HostFrameComposer.cpp
@@ -524,10 +524,7 @@ HWC3::Error HostFrameComposer::presentDisplay(
*outDisplayFence = std::move(flushCompleteFence);
} else {
- rcEnc->rcSetDisplayColorBuffer(
- rcEnc, displayInfo.hostDisplayId,
- hostCon->grallocHelper()->getHostHandle(displayClientTarget.getBuffer()));
- post(hostCon, rcEnc, displayClientTarget.getBuffer());
+ post(hostCon, rcEnc, displayInfo.hostDisplayId, displayClientTarget.getBuffer());
*outDisplayFence = std::move(fence);
}
}
@@ -696,10 +693,7 @@ HWC3::Error HostFrameComposer::presentDisplay(
displayId, compositionResult->getDrmBuffer(), displayClientTargetFence);
*outDisplayFence = std::move(flushFence);
} else {
- rcEnc->rcSetDisplayColorBuffer(
- rcEnc, displayInfo.hostDisplayId,
- hostCon->grallocHelper()->getHostHandle(displayClientTarget.getBuffer()));
- post(hostCon, rcEnc, displayClientTarget.getBuffer());
+ post(hostCon, rcEnc, displayInfo.hostDisplayId, displayClientTarget.getBuffer());
*outDisplayFence = std::move(displayClientTargetFence);
}
ALOGV("%s fallback to post, returns outRetireFence %d", __FUNCTION__,
@@ -712,10 +706,13 @@ HWC3::Error HostFrameComposer::presentDisplay(
}
void HostFrameComposer::post(HostConnection* hostCon, ExtendedRCEncoderContext* rcEnc,
- buffer_handle_t h) {
+ uint32_t hostDisplayId, buffer_handle_t h) {
assert(cb && "native_handle_t::from(h) failed");
hostCon->lock();
+ rcEnc->rcSetDisplayColorBuffer(
+ rcEnc, hostDisplayId,
+ hostCon->grallocHelper()->getHostHandle(h));
rcEnc->rcFBPost(rcEnc, hostCon->grallocHelper()->getHostHandle(h));
hostCon->flush();
hostCon->unlock();
diff --git a/system/hwc3/HostFrameComposer.h b/system/hwc3/HostFrameComposer.h
index e90f7cfd..2cd9854a 100644
--- a/system/hwc3/HostFrameComposer.h
+++ b/system/hwc3/HostFrameComposer.h
@@ -74,7 +74,8 @@ class HostFrameComposer : public FrameComposer {
private:
HWC3::Error createHostComposerDisplayInfo(Display* display, uint32_t hostDisplayId);
- void post(HostConnection* hostCon, ExtendedRCEncoderContext* rcEnc, buffer_handle_t h);
+ void post(HostConnection* hostCon, ExtendedRCEncoderContext* rcEnc, uint32_t hostDisplayId,
+ buffer_handle_t h);
bool mIsMinigbm = false;