]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/gpu/drm/exynos/exynos7_drm_decon.c
drm: Nuke fb->pixel_format
[mirror_ubuntu-jammy-kernel.git] / drivers / gpu / drm / exynos / exynos7_drm_decon.c
index 7f9901b7777b36786380c447c784418f4d7e3b07..f9ab19e205e243d931412257064455582747e92a 100644 (file)
@@ -281,7 +281,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
        val = readl(ctx->regs + WINCON(win));
        val &= ~WINCONx_BPPMODE_MASK;
 
-       switch (fb->pixel_format) {
+       switch (fb->format->format) {
        case DRM_FORMAT_RGB565:
                val |= WINCONx_BPPMODE_16BPP_565;
                val |= WINCONx_BURSTLEN_16WORD;
@@ -330,7 +330,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
                break;
        }
 
-       DRM_DEBUG_KMS("bpp = %d\n", fb->bits_per_pixel);
+       DRM_DEBUG_KMS("bpp = %d\n", fb->format->cpp[0] * 8);
 
        /*
         * In case of exynos, setting dma-burst to 16Word causes permanent
@@ -340,7 +340,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
         * movement causes unstable DMA which results into iommu crash/tear.
         */
 
-       padding = (fb->pitches[0] / (fb->bits_per_pixel >> 3)) - fb->width;
+       padding = (fb->pitches[0] / fb->format->cpp[0]) - fb->width;
        if (fb->width + padding < MIN_FB_WIDTH_FOR_16WORD_BURST) {
                val &= ~WINCONx_BURSTLEN_MASK;
                val |= WINCONx_BURSTLEN_8WORD;
@@ -407,7 +407,7 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
        unsigned int last_x;
        unsigned int last_y;
        unsigned int win = plane->index;
-       unsigned int bpp = fb->bits_per_pixel >> 3;
+       unsigned int bpp = fb->format->cpp[0];
        unsigned int pitch = fb->pitches[0];
 
        if (ctx->suspended)
@@ -603,7 +603,6 @@ static irqreturn_t decon_irq_handler(int irq, void *dev_id)
 {
        struct decon_context *ctx = (struct decon_context *)dev_id;
        u32 val, clear_bit;
-       int win;
 
        val = readl(ctx->regs + VIDINTCON1);
 
@@ -617,14 +616,6 @@ static irqreturn_t decon_irq_handler(int irq, void *dev_id)
 
        if (!ctx->i80_if) {
                drm_crtc_handle_vblank(&ctx->crtc->base);
-               for (win = 0 ; win < WINDOWS_NR ; win++) {
-                       struct exynos_drm_plane *plane = &ctx->planes[win];
-
-                       if (!plane->pending_fb)
-                               continue;
-
-                       exynos_drm_crtc_finish_update(ctx->crtc, plane);
-               }
 
                /* set wait vsync event to zero and wake up queue. */
                if (atomic_read(&ctx->wait_vsync_event)) {