diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-07 01:07:00 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-07 01:07:00 +0000 |
commit | 26da10eeef9a2737600d1aecda35ef31ad88494f (patch) | |
tree | 0068dd0351f2e33ec9b57372f41473490d0768bf | |
parent | 2159116949ad4f4a723657799b727da2e367a400 (diff) | |
parent | c2cfa754a77b588184e906c54d88587d53c91adf (diff) | |
download | crosvm-android12-d1-s5-release.tar.gz |
Snap for 7343210 from c2cfa754a77b588184e906c54d88587d53c91adf to sc-d1-releaseandroid-12.0.0_r7android-12.0.0_r6android-12.0.0_r5android-12.0.0_r4android-12.0.0_r15android-12.0.0_r14android-12.0.0_r13android-12.0.0_r12android12-d1-s6-releaseandroid12-d1-s5-releaseandroid12-d1-s4-releaseandroid12-d1-s3-releaseandroid12-d1-s2-releaseandroid12-d1-s1-releaseandroid12-d1-release
Change-Id: I522cdfee8a18404fc4c51e7b533cf73e554eee2b
-rw-r--r-- | devices/src/virtio/gpu/virtio_gpu.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/devices/src/virtio/gpu/virtio_gpu.rs b/devices/src/virtio/gpu/virtio_gpu.rs index 00086903a..2e7abb32d 100644 --- a/devices/src/virtio/gpu/virtio_gpu.rs +++ b/devices/src/virtio/gpu/virtio_gpu.rs @@ -215,14 +215,13 @@ impl VirtioGpu { scanout_data: Option<VirtioScanoutBlobData>, ) -> VirtioGpuResult { let mut display = self.display.borrow_mut(); - if resource_id == 0 { - if let Some(surface_id) = self.scanout_surface_id.take() { - display.release_surface(surface_id); - } - self.scanout_resource_id = None; - return Ok(OkNoData); - } - + /// b/186580833. + /// Remove the part of deleting surface when resource_id is 0. + /// This is a workaround to solve the issue of black display. + /// Observation is when Surfaceflinger falls back to client composition, + /// host receives set_scanout 0 0, and then set scanout 0 <some valid resid>. + /// The first 0 0 removes the surface, the second creates a new surface + /// with id++, which will be more than 0 and be ignorned in vnc or webrtc let resource = self .resources .get_mut(&resource_id) |