From patchwork Tue Sep 29 19:53:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 11808337 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B71FA112C for ; Wed, 30 Sep 2020 07:50:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 768052071E for ; Wed, 30 Sep 2020 07:50:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="RO//89YR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 768052071E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B0518972B; Wed, 30 Sep 2020 07:50:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8053F89D7D for ; Tue, 29 Sep 2020 19:53:55 +0000 (UTC) Received: by mail-qv1-xf4a.google.com with SMTP id t4so3179775qvr.21 for ; Tue, 29 Sep 2020 12:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=npDIDH8u9pb1vM4CGA+qsDrRA4V93ya8kgT58vdNrFM=; b=RO//89YRcYN32WTPmki5WDw6gb2yTpvsVcYf7skhnvgRT+nOxOxaKT480FJfQPlT76 hQJAEIoy6V5OhLXbjZKzHkpfPP/e9sp4AfA0apXJrenKTNhaQaHkx4bhJEbRpCO6Aigu KzlOTmLHweu9RBFcCkiAxuJU4sKKSLCLZhnddKCxUGgbE6ijjgTEHd4iOkiMwiEBvn1E Y6Kf+W+PHgNksuI/Mg4VbYyRwU3wkps9zjSjjXlNoVzDZUFFNJaJX9S0TAj/gUHvH4gB W4ehWyvJEZTVIMqEHrlyyWTntiVA+qW05T7qVbRZMmRbvCeXHhYnmDrbHY3Zv9fqLPbh rjyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=npDIDH8u9pb1vM4CGA+qsDrRA4V93ya8kgT58vdNrFM=; b=LMUcr/zCHoollyx6THOopOmWWaxX0OHlZFTOL90CdLCo+UgfsXRqAA7qx4nza1oGsw 4Tt2OFy03eQACg16Xdst+4sTR1gSzXypTVatBY9r0jE7bHsfxbk9n8AL+DubruZcm1ta WZJS6RLOH054nG8rBo3M66pFcZuhkQwY85VPokh7a9x1qyZcNjE8DgoyYgkTGEGu2cPn iSRME/5oUX5MdlzGuCqHWitOP28VF+9bpQYOhM1d+aAhoppZJ4jmayrKHbK2tyJH/8ie hWcw9H3Vi3O1Icgtkw1BKLBpFGC8sxhxi9exfRaVYwmk5dxa7Mwlg4riagVNJWxh2o8C ywyg== X-Gm-Message-State: AOAM530TZSoPaTtdeHM5lyQN+QBZBPV4o5HaKGJtiaXeKQl2afjGvqqg ZfUTqJIdp+CBh3TnJcEuuOvMzp0= X-Google-Smtp-Source: ABdhPJx+xrZu4cgkJYKQvY6lDsc5o9D/WbEkFngkIFrKQm4HM0YhqyDt270elLbmgPDAWw993bj1Zp0= X-Received: from pcc-desktop.svl.corp.google.com ([2620:15c:2ce:0:7220:84ff:fe09:385a]) (user=pcc job=sendgmr) by 2002:a0c:90f1:: with SMTP id p104mr6063299qvp.16.1601409234455; Tue, 29 Sep 2020 12:53:54 -0700 (PDT) Date: Tue, 29 Sep 2020 12:53:44 -0700 Message-Id: <20200929195344.2219796-1-pcc@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.28.0.709.gb0816b6eb0-goog Subject: [PATCH v2] Partially revert "video: fbdev: amba-clcd: Retire elder CLCD driver" From: Peter Collingbourne To: Linus Walleij , Eric Anholt , Daniel Vetter , Neil Armstrong X-Mailman-Approved-At: Wed, 30 Sep 2020 07:50:09 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Collingbourne , Kevin Brodsky , Russell King , ML dri-devel , Sean Paul , Linux ARM Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Also partially revert the follow-up change "drm: pl111: Absorb the external register header". This reverts the parts of commits 7e4e589db76a3cf4c1f534eb5a09cc6422766b93 and 0fb8125635e8eb5483fb095f98dcf0651206a7b8 that touch paths outside of drivers/gpu/drm/pl111. The fbdev driver is used by Android's FVP configuration. Using the DRM driver together with DRM's fbdev emulation results in a failure to boot Android. The root cause is that Android's generic fbdev userspace driver relies on the ability to set the pixel format via FBIOPUT_VSCREENINFO, which is not supported by fbdev emulation. There have been other less critical behavioral differences identified between the fbdev driver and the DRM driver with fbdev emulation. The DRM driver exposes different values for the panel's width, height and refresh rate, and the DRM driver fails a FBIOPUT_VSCREENINFO syscall with yres_virtual greater than the maximum supported value instead of letting the syscall succeed and setting yres_virtual based on yres. Signed-off-by: Peter Collingbourne --- View this change in Gerrit: https://linux-review.googlesource.com/q/I2d7e59b0e693d9fec206d40df190c5aa02844b56 MAINTAINERS | 5 + drivers/video/fbdev/Kconfig | 20 + drivers/video/fbdev/Makefile | 1 + drivers/video/fbdev/amba-clcd.c | 986 ++++++++++++++++++++++++++++++++ include/linux/amba/clcd-regs.h | 87 +++ include/linux/amba/clcd.h | 290 ++++++++++ 6 files changed, 1389 insertions(+) create mode 100644 drivers/video/fbdev/amba-clcd.c create mode 100644 include/linux/amba/clcd-regs.h create mode 100644 include/linux/amba/clcd.h diff --git a/MAINTAINERS b/MAINTAINERS index 190c7fa2ea01..671c1fa79e64 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1460,6 +1460,11 @@ S: Odd Fixes F: drivers/amba/ F: include/linux/amba/bus.h +ARM PRIMECELL CLCD PL110 DRIVER +M: Russell King +S: Odd Fixes +F: drivers/video/fbdev/amba-clcd.* + ARM PRIMECELL KMI PL050 DRIVER M: Russell King S: Odd Fixes diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index b2c9dd4f0cb5..402e85450bb5 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -272,6 +272,26 @@ config FB_PM2_FIFO_DISCONNECT help Support the Permedia2 FIFO disconnect feature. +config FB_ARMCLCD + tristate "ARM PrimeCell PL110 support" + depends on ARM || ARM64 || COMPILE_TEST + depends on FB && ARM_AMBA && HAS_IOMEM + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_MODE_HELPERS if OF + select VIDEOMODE_HELPERS if OF + select BACKLIGHT_CLASS_DEVICE if OF + help + This framebuffer device driver is for the ARM PrimeCell PL110 + Colour LCD controller. ARM PrimeCells provide the building + blocks for System on a Chip devices. + + If you want to compile this as a module (=code which can be + inserted into and removed from the running kernel), say M + here and read . The module + will be called amba-clcd. + config FB_ACORN bool "Acorn VIDC support" depends on (FB = y) && ARM && ARCH_ACORN diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile index cad4fb64442a..a0705b99e643 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -75,6 +75,7 @@ obj-$(CONFIG_FB_HIT) += hitfb.o obj-$(CONFIG_FB_ATMEL) += atmel_lcdfb.o obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o +obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o obj-$(CONFIG_FB_GOLDFISH) += goldfishfb.o obj-$(CONFIG_FB_68328) += 68328fb.o obj-$(CONFIG_FB_GBE) += gbefb.o diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c new file mode 100644 index 000000000000..b7682de412d8 --- /dev/null +++ b/drivers/video/fbdev/amba-clcd.c @@ -0,0 +1,986 @@ +/* + * linux/drivers/video/amba-clcd.c + * + * Copyright (C) 2001 ARM Limited, by David A Rusling + * Updated to 2.5, Deep Blue Solutions Ltd. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + * + * ARM PrimeCell PL110 Color LCD Controller + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include