diff --git a/bufferinfo/BufferInfoMapperMetadata.cpp b/bufferinfo/BufferInfoMapperMetadata.cpp
index dc1b906..125c5c8 100644
--- a/bufferinfo/BufferInfoMapperMetadata.cpp
+++ b/bufferinfo/BufferInfoMapperMetadata.cpp
@@ -31,6 +31,23 @@
 
 namespace android {
 
+namespace {
+
+std::optional<std::pair<uint32_t, uint32_t>> GetAlignedDimensions(
+    const ui::PlaneLayout &layout) {
+  if (layout.sampleIncrementInBits == 0 || layout.strideInBytes == 0) {
+    ALOGW("Invalid plane layout");
+    return std::nullopt;
+  }
+
+  constexpr uint32_t kBitsPerByte = 8;
+  return std::pair{layout.strideInBytes * kBitsPerByte /
+                       layout.sampleIncrementInBits,
+                   layout.totalSizeInBytes / layout.strideInBytes};
+}
+
+}  // namespace
+
 BufferInfoGetter *BufferInfoMapperMetadata::CreateInstance() {
   if (GraphicBufferMapper::getInstance().getMapperVersion() <
       GraphicBufferMapper::GRALLOC_4)
@@ -136,6 +153,25 @@
     bi.sizes[i] = layouts[i].totalSizeInBytes;
   }
 
+  uint64_t usage = 0;
+  err = mapper.getUsage(handle, &usage);
+  if (err != 0) {
+    ALOGE("Failed to get Usage err=%d", err);
+    return {};
+  }
+
+  if ((usage & GRALLOC_USAGE_CURSOR) != 0) {
+    if (layouts.size() > 1) {
+      ALOGW("Multiplanar format buffer alignment not supported");
+    } else {
+      auto aligned = GetAlignedDimensions(layouts[0]);
+      if (aligned.has_value()) {
+        bi.width = aligned->first;
+        bi.height = aligned->second;
+      }
+    }
+  }
+
   err = GetFds(handle, &bi);
   if (err != 0) {
     ALOGE("Failed to get fds (err=%d)", err);
diff --git a/drm/DrmPlane.cpp b/drm/DrmPlane.cpp
index 0fe060d..2251a78 100644
--- a/drm/DrmPlane.cpp
+++ b/drm/DrmPlane.cpp
@@ -284,6 +284,13 @@
   auto disp = opt_disp.value();
   auto src = opt_src.value();
 
+  if (type_ == DRM_PLANE_TYPE_CURSOR) {
+    disp.right = disp.left + static_cast<int>(layer.bi->width);
+    disp.bottom = disp.top + static_cast<int>(layer.bi->height);
+    src = {0, 0, static_cast<float>(layer.bi->width),
+           static_cast<float>(layer.bi->height)};
+  }
+
   if (!crtc_property_.AtomicSet(pset, crtc_id) ||
       !fb_property_.AtomicSet(pset, layer.fb->GetFbId()) ||
       !crtc_x_property_.AtomicSet(pset, disp.left) ||
