}
 EXPORT_SYMBOL(drm_fb_xrgb8888_to_rgb888);
 
+static void drm_fb_xrgb8888_to_argb8888_line(void *dbuf, const void *sbuf, unsigned int pixels)
+{
+       __le32 *dbuf32 = dbuf;
+       const __le32 *sbuf32 = sbuf;
+       unsigned int x;
+       u32 pix;
+
+       for (x = 0; x < pixels; x++) {
+               pix = le32_to_cpu(sbuf32[x]);
+               pix |= GENMASK(31, 24); /* fill alpha bits */
+               dbuf32[x] = cpu_to_le32(pix);
+       }
+}
+
+/**
+ * drm_fb_xrgb8888_to_argb8888 - Convert XRGB8888 to ARGB8888 clip buffer
+ * @dst: Array of ARGB8888 destination buffers
+ * @dst_pitch: Array of numbers of bytes between the start of two consecutive scanlines
+ *             within @dst; can be NULL if scanlines are stored next to each other.
+ * @src: Array of XRGB8888 source buffer
+ * @fb: DRM framebuffer
+ * @clip: Clip rectangle area to copy
+ *
+ * This function copies parts of a framebuffer to display memory and converts the
+ * color format during the process. The parameters @dst, @dst_pitch and @src refer
+ * to arrays. Each array must have at least as many entries as there are planes in
+ * @fb's format. Each entry stores the value for the format's respective color plane
+ * at the same index.
+ *
+ * This function does not apply clipping on @dst (i.e. the destination is at the
+ * top-left corner).
+ *
+ * Drivers can use this function for ARGB8888 devices that don't support XRGB8888
+ * natively. It sets an opaque alpha channel as part of the conversion.
+ */
+void drm_fb_xrgb8888_to_argb8888(struct iosys_map *dst, const unsigned int *dst_pitch,
+                                const struct iosys_map *src, const struct drm_framebuffer *fb,
+                                const struct drm_rect *clip)
+{
+       static const u8 dst_pixsize[DRM_FORMAT_MAX_PLANES] = {
+               4,
+       };
+
+       drm_fb_xfrm(dst, dst_pitch, dst_pixsize, src, fb, clip, false,
+                   drm_fb_xrgb8888_to_argb8888_line);
+}
+EXPORT_SYMBOL(drm_fb_xrgb8888_to_argb8888);
+
 static void drm_fb_rgb565_to_xrgb8888_line(void *dbuf, const void *sbuf, unsigned int pixels)
 {
        __le32 *dbuf32 = dbuf;
        /* treat alpha channel like filler bits */
        if (fb_format == DRM_FORMAT_ARGB8888)
                fb_format = DRM_FORMAT_XRGB8888;
-       if (dst_format == DRM_FORMAT_ARGB8888)
-               dst_format = DRM_FORMAT_XRGB8888;
        if (fb_format == DRM_FORMAT_ARGB2101010)
                fb_format = DRM_FORMAT_XRGB2101010;
        if (dst_format == DRM_FORMAT_ARGB2101010)
                } else if (dst_format == DRM_FORMAT_RGB888) {
                        drm_fb_xrgb8888_to_rgb888(dst, dst_pitch, src, fb, clip);
                        return 0;
+               } else if (dst_format == DRM_FORMAT_ARGB8888) {
+                       drm_fb_xrgb8888_to_argb8888(dst, dst_pitch, src, fb, clip);
+                       return 0;
                } else if (dst_format == DRM_FORMAT_XRGB2101010) {
                        drm_fb_xrgb8888_to_xrgb2101010(dst, dst_pitch, src, fb, clip);
                        return 0;
 
        const u8 expected[TEST_BUF_SIZE];
 };
 
+struct convert_to_argb8888_result {
+       unsigned int dst_pitch;
+       const u32 expected[TEST_BUF_SIZE];
+};
+
 struct convert_to_xrgb2101010_result {
        unsigned int dst_pitch;
        const u32 expected[TEST_BUF_SIZE];
        struct convert_to_rgb332_result rgb332_result;
        struct convert_to_rgb565_result rgb565_result;
        struct convert_to_rgb888_result rgb888_result;
+       struct convert_to_argb8888_result argb8888_result;
        struct convert_to_xrgb2101010_result xrgb2101010_result;
 };
 
                        .dst_pitch = 0,
                        .expected = { 0x00, 0x00, 0xFF },
                },
+               .argb8888_result = {
+                       .dst_pitch = 0,
+                       .expected = { 0xFFFF0000 },
+               },
                .xrgb2101010_result = {
                        .dst_pitch = 0,
                        .expected = { 0x3FF00000 },
                        .dst_pitch = 0,
                        .expected = { 0x00, 0x00, 0xFF },
                },
+               .argb8888_result = {
+                       .dst_pitch = 0,
+                       .expected = { 0xFFFF0000 },
+               },
                .xrgb2101010_result = {
                        .dst_pitch = 0,
                        .expected = { 0x3FF00000 },
                                0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
                        },
                },
+               .argb8888_result = {
+                       .dst_pitch = 0,
+                       .expected = {
+                               0xFFFFFFFF, 0xFF000000,
+                               0xFFFF0000, 0xFF00FF00,
+                               0xFF0000FF, 0xFFFF00FF,
+                               0xFFFFFF00, 0xFF00FFFF,
+                       },
+               },
                .xrgb2101010_result = {
                        .dst_pitch = 0,
                        .expected = {
                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                        },
                },
+               .argb8888_result = {
+                       .dst_pitch = 20,
+                       .expected = {
+                               0xFF0E449C, 0xFF114D05, 0xFFA80303, 0x00000000, 0x00000000,
+                               0xFF6C7073, 0xFF0E449C, 0xFF114D05, 0x00000000, 0x00000000,
+                               0xFFA80303, 0xFF6C7073, 0xFF0E449C, 0x00000000, 0x00000000,
+                       },
+               },
                .xrgb2101010_result = {
                        .dst_pitch = 20,
                        .expected = {
        KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
 }
 
+static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test)
+{
+       const struct convert_xrgb8888_case *params = test->param_value;
+       const struct convert_to_argb8888_result *result = ¶ms->argb8888_result;
+       size_t dst_size;
+       u32 *buf = NULL;
+       __le32 *xrgb8888 = NULL;
+       struct iosys_map dst, src;
+
+       struct drm_framebuffer fb = {
+               .format = drm_format_info(DRM_FORMAT_XRGB8888),
+               .pitches = { params->pitch, 0, 0 },
+       };
+
+       dst_size = conversion_buf_size(DRM_FORMAT_ARGB8888,
+                                      result->dst_pitch, ¶ms->clip);
+       KUNIT_ASSERT_GT(test, dst_size, 0);
+
+       buf = kunit_kzalloc(test, dst_size, GFP_KERNEL);
+       KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf);
+       iosys_map_set_vaddr(&dst, buf);
+
+       xrgb8888 = cpubuf_to_le32(test, params->xrgb8888, TEST_BUF_SIZE);
+       KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888);
+       iosys_map_set_vaddr(&src, xrgb8888);
+
+       drm_fb_xrgb8888_to_argb8888(&dst, &result->dst_pitch, &src, &fb, ¶ms->clip);
+       buf = le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / sizeof(u32));
+       KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
+}
+
 static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
 {
        const struct convert_xrgb8888_case *params = test->param_value;
        KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb332, convert_xrgb8888_gen_params),
        KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb565, convert_xrgb8888_gen_params),
        KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_rgb888, convert_xrgb8888_gen_params),
+       KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_argb8888, convert_xrgb8888_gen_params),
        KUNIT_CASE_PARAM(drm_test_fb_xrgb8888_to_xrgb2101010, convert_xrgb8888_gen_params),
        {}
 };