diff -Naur qtbase/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp new/qlinuxfbscreen.cpp
--- qtbase/src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp	2023-09-20 11:04:39.054208700 +0800
+++ new/qlinuxfbscreen.cpp	2023-09-20 11:02:02.729014457 +0800
@@ -55,6 +55,7 @@
 #include <signal.h>
 
 #include <linux/fb.h>
+#define ZHANG_SUPPORT_RORATE
 
 QT_BEGIN_NAMESPACE
 
@@ -280,7 +281,11 @@
 }
 
 QLinuxFbScreen::QLinuxFbScreen(const QStringList &args)
+#ifdef ZHANG_SUPPORT_RORATE
+    : mArgs(args), mFbFd(-1), mBlitter(0), mRotation(0)
+#else
     : mArgs(args), mFbFd(-1), mBlitter(0)
+#endif
 {
 }
 
@@ -306,6 +311,9 @@
     QRegularExpression mmSizeRx(QLatin1String("mmsize=(\\d+)x(\\d+)"));
     QRegularExpression sizeRx(QLatin1String("size=(\\d+)x(\\d+)"));
     QRegularExpression offsetRx(QLatin1String("offset=(\\d+)x(\\d+)"));
+#ifdef ZHANG_SUPPORT_RORATE
+    QRegularExpression rotationRx(QLatin1String("rotation=(0|90|180|270)"));
+#endif
 
     QString fbDevice, ttyDevice;
     QSize userMmSize;
@@ -327,6 +335,10 @@
             ttyDevice = match.captured(1);
         else if (arg.contains(fbRx, &match))
             fbDevice = match.captured(1);
+#ifdef ZHANG_SUPPORT_RORATE
+        else if (arg.contains(rotationRx, &match))
+            mRotation = match.captured(1).toInt();
+#endif
     }
 
     if (fbDevice.isEmpty()) {
@@ -365,9 +377,23 @@
     mDepth = determineDepth(vinfo);
     mBytesPerLine = finfo.line_length;
     QRect geometry = determineGeometry(vinfo, userGeometry);
+#ifdef ZHANG_SUPPORT_RORATE
+    QRect originalGeometry = geometry;
+    if( mRotation == 90 || mRotation == 270 )
+    {
+        int tmp = geometry.width();
+        geometry.setWidth(geometry.height());
+        geometry.setHeight(tmp);
+    }
+#endif
     mGeometry = QRect(QPoint(0, 0), geometry.size());
     mFormat = determineFormat(vinfo, mDepth);
-    mPhysicalSize = determinePhysicalSize(vinfo, userMmSize, geometry.size());
+#ifdef ZHANG_SUPPORT_RORATE
+    mPhysicalSize = determinePhysicalSize(vinfo, userMmSize, originalGeometry.size());
+    fprintf(stderr,"determinePhysicalSize %d %d ,%f %f \n",userMmSize.width(),userMmSize.height(),mPhysicalSize.width(),mPhysicalSize.height());
+#else
+	mPhysicalSize = determinePhysicalSize(vinfo, userMmSize, geometry.size());
+#endif
 
     // mmap the framebuffer
     mMmap.size = finfo.smem_len;
@@ -376,13 +402,19 @@
         qErrnoWarning(errno, "Failed to mmap framebuffer");
         return false;
     }
-
+#ifdef ZHANG_SUPPORT_RORATE
+    mMmap.offset = originalGeometry.y() * mBytesPerLine + originalGeometry.x() * mDepth / 8;
+#else
     mMmap.offset = geometry.y() * mBytesPerLine + geometry.x() * mDepth / 8;
+#endif
     mMmap.data = data + mMmap.offset;
 
     QFbScreen::initializeCompositor();
-    mFbScreenImage = QImage(mMmap.data, geometry.width(), geometry.height(), mBytesPerLine, mFormat);
-
+#ifdef ZHANG_SUPPORT_RORATE
+    mFbScreenImage = QImage(mMmap.data, originalGeometry.width(), originalGeometry.height(), mBytesPerLine, mFormat);
+#else
+	mFbScreenImage = QImage(mMmap.data, geometry.width(), geometry.height(), mBytesPerLine, mFormat);
+#endif
     mCursor = new QFbCursor(this);
 
     mTtyFd = openTtyDevice(ttyDevice);
@@ -410,8 +442,29 @@
         mBlitter = new QPainter(&mFbScreenImage);
 
     QVector<QRect> rects = touched.rects();
+#ifdef ZHANG_SUPPORT_RORATE
     for (int i = 0; i < rects.size(); i++)
+    {
+        if( mRotation == 90 || mRotation == 270 )
+        {
+            mBlitter->translate(mGeometry.height()/2, mGeometry.width()/2);
+        }
+        else if( mRotation == 180 )
+        {
+            mBlitter->translate(mGeometry.width()/2, mGeometry.height()/2);
+        }
+        if( mRotation != 0 )
+        {
+            mBlitter->rotate(mRotation);
+           mBlitter->translate(-mGeometry.width()/2, -mGeometry.height()/2);
+        }
+        mBlitter->drawImage(rects[i], *mScreenImage, rects[i]);//?
+		mBlitter->resetTransform();
+	}
+#else
+     for (int i = 0; i < rects.size(); i++)
         mBlitter->drawImage(rects[i], *mScreenImage, rects[i]);
+#endif
     return touched;
 }
 
diff -Naur qtbase/src/plugins/platforms/linuxfb/qlinuxfbscreen.h new/qlinuxfbscreen.h
--- qtbase/src/plugins/platforms/linuxfb/qlinuxfbscreen.h	2023-09-20 11:04:39.054208700 +0800
+++ new/qlinuxfbscreen.h	2023-09-20 11:02:02.729014457 +0800
@@ -69,6 +69,7 @@
     } mMmap;
 
     QPainter *mBlitter;
+    int mRotation;
 };
 
 QT_END_NAMESPACE
