Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2575286pxb; Thu, 3 Feb 2022 09:23:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0Wx6nNDOwhWD76niBe12MV2AzIuk7tFJgxamUKAdURE6MP1hVHPhd3Kr0xXuzIiigWn0w X-Received: by 2002:a17:902:b407:: with SMTP id x7mr36266614plr.99.1643909010102; Thu, 03 Feb 2022 09:23:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643909010; cv=none; d=google.com; s=arc-20160816; b=OoX1Lc1uOSDmgqthnM2Ovd9WZ0B7wahpwz6RX1d5fKMNyYaCv3cvnLukeqi3oOdWFZ sOpVSx1kuSr0qn/uHsfLLbeNb52Ri70faRRwO6S/V4gJG3Rxj6iKG2LG9napZA7pb5J+ ae3kyL5ojTp/WxZp6r1u5w4HDuGSV6nzXikqDAAszPLQge3Dutgo0QXt//CWrxLZ1YNy iVhkK22K2KRfygjWTVU+N7rDI7lYqUHcFl294X/pVpxm3XvvBnapnam3q8TYV37ZdX6y hhaQg3d0q3fh0Ob87txxvQ0ldq9qb83Lla2jQpuRloWx2QfT7LSTbi7JWG63Xl1NLLLp qjPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=gddeGMwd5HvIY97QboZsBEVQ7qY+HtThTvqM3wj7VBQ=; b=lQ/2U76CMtSQKV0Nn4oTEPMpormGjASVJjYKeseFpV9jIWhJYwXcgdPMLXxNHmVWFP aYUYKzOfXBot2dy83pTDr69A0wDn1tnGF61OpN9qfgO/rAv9rDoVhRaM7hpGFgSVIBGD s6Gb5T44p4tVsFqr8jB7a0v7zyUU1OroOMneWNC6QdCa+yOQjLCOpWnvisX6l5MfNAjW dE1+99uvuSaJYokp7ISL579MYPxnPZ/6hWHT7TGGF+63/lRpxiSxknhLAmvsuPbkIvyO 6LRU9aHwzyFeDmCr7TN7FevWfauKDjm7XBPaqltNyf2bf+ifIzziZeoNwaEuXxcIfryY xqgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=eMcvgoBO; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=I+3Tllpd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v64si22195917pgd.713.2022.02.03.09.23.17; Thu, 03 Feb 2022 09:23:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=eMcvgoBO; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=I+3Tllpd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349655AbiBCI66 (ORCPT + 99 others); Thu, 3 Feb 2022 03:58:58 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:38261 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbiBCI64 (ORCPT ); Thu, 3 Feb 2022 03:58:56 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 117A8580290; Thu, 3 Feb 2022 03:58:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 03 Feb 2022 03:58:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=gddeGMwd5HvIY97QboZsBEVQ7qY+HtThTvqM3w j7VBQ=; b=eMcvgoBO38Zyz8D+vVfbhwgRP/koxNeNUVSWWR0oufJUWOZJ+T95U6 ZQR7dLuzXo0BYfnYYpQn7U5SRbI70V51kOVlA71JfkekHYBod1kVud+bi4w5xknI UqGDd8SyaHodu4KtnDM5riDXLEM9qOD8OOQ07e2Cpbd9863lIMz/B6UrKmRgZmkc F64S5aH6O8mxeRaZFdfyVVsZr19SUzBP5bNZloF1DfCR0Jsd3yBOccgDQCRdulo9 6bu6bJ+MkPieiNp8TdN6qt0BVYMwo4YO2UCffiAIq7k9RxZ0Bsz1KBnU0b7LF8t7 WGpJaVp/716+o3kkBMntvVjYQ0ouPqdg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=gddeGMwd5HvIY97Qb oZsBEVQ7qY+HtThTvqM3wj7VBQ=; b=I+3Tllpd7NGNwcLugopFECVcrRvmZ6mDj CTrG9rcxe9vEjwLYSIdTsntPVcvwXYahB92FxqbWOXgL3KtYxYQehzAG/BibnoZT ojDO+2nNLV/7zn8tRwhzpEPmlP5gVMzmpFvhut5jUG2HBC8dZBDEKANt9fPb37P3 DTsGcfm8IbfFkFAjgLzFjsIDols+opxYBDFOXtFJOUhDw5BRqUQK+SV3vvSP9g8s OjlxoGXfiyO5X4PfMyo5TFTmLm4VHNWl2XLNBE9aN3OnzRfsW0rvVeTG6bDn+H95 jJiv6cwUukjlPWzYC6DgggNHYUc8D2fd/OzPSCXPM0EWxIFaDtCQA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeeigdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goufhushhpvggtthffohhmrghinhculdegledmnecujfgurhepfffhvffukfhfgggtuggj sehgtderredttddvnecuhfhrohhmpeforgigihhmvgcutfhiphgrrhguuceomhgrgihimh gvsegtvghrnhhordhtvggthheqnecuggftrfgrthhtvghrnhepgefgudeigeefkefhffff vedutedugeegudduleetueetudeffeettefhgeejjeelnecuffhomhgrihhnpeguvggsih grnhdrohhrghdpghhithhhuhgsrdhiohenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Feb 2022 03:58:53 -0500 (EST) Date: Thu, 3 Feb 2022 09:58:51 +0100 From: Maxime Ripard To: Sui Jingfeng <15330273260@189.cn> Cc: Dan Carpenter , Lucas Stach , Maarten Lankhorst , Roland Scheidegger , Zack Rusin , Christian Gmeiner , David Airlie , Daniel Vetter , Rob Herring , Thomas Bogendoerfer , Krzysztof Kozlowski , Andrey Zhizhikin , Sam Ravnborg , suijingfeng , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Randy Dunlap Subject: Re: [PATCH v6 1/3] drm/lsdc: add drm driver for loongson display controller Message-ID: <20220203085851.yqstkfgt4dz7rcnw@houat> References: <20220203082546.3099-1-15330273260@189.cn> <20220203082546.3099-2-15330273260@189.cn> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pho5irsonjgn67rj" Content-Disposition: inline In-Reply-To: <20220203082546.3099-2-15330273260@189.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pho5irsonjgn67rj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Feb 03, 2022 at 04:25:44PM +0800, Sui Jingfeng wrote: > From: suijingfeng >=20 > There is a display controller in loongson's LS2K1000 SoC and LS7A1000 > bridge, and the DC in those chip is a PCI device. This patch provide > a minimal support for this display controller which is mainly for > graphic environment bring up. >=20 > This display controller has two display pipes but with only one hardware > cursor. Each way has a DVO output interface and the CRTC is able to scano= ut > from 1920x1080 resolution at 60Hz. The maxmium resolution is 2048x2048@60= hz. >=20 > LS2K1000 is a SoC, only system memory is available. Therefore scanout from > system memory is the only choice. We prefer the CMA helper base solution > because the gc1000 gpu can use etnaviv driver, in this case etnaviv and > lsdc could made a compatible pair. Even through it is possible to use VRAM > helper base solution on ls2k1000 by carving out part of system memory as > VRAM. >=20 > For LS7A1000, there are 4 gpios whos control register is located at the dc > register space which is not the geneal purpose GPIO. The 4 gpios can emul= ate > two way i2c. One for DVO0, another for DVO1. This is the reason the why we > are not using the drm bridge framework. >=20 > LS2K1000 and LS2K0500 SoC don't have such hardware, they use general purp= ose > GPIO emulated i2c or hardware i2c adapter from other module to serve this > purpose. Drm bridge and drm panel is suitable for those SoC, we have alre= ady > implement it on our own downstream kernel. But due to the upstream kernel > don't have gpio, pwm and i2c driver support for LS2K1000. We just can not > upstream our support for the drm bridge subsystem. >=20 > The DC in LS7A1000 can scanout from both the system memory and the dedica= te > VRAM attached to the ddr3 memory controller. Sadly, only scanout from the > VRAM is proved to be a reliable solution for massive product. Scanout from > the system memory suffer from some hardware deficiency which cause the > screen flickering under RAM pressure. This is the reason why we integrate > two distict helpers into one piece of device driver. But CMA base helper = is > still usable on ls7a1000 for normal usage, expecially on ls7a1000+ bridge > chip. We have also implemented demage update on top of CMA helper which > copy the demaged shadow framebuffer region from system RAM to the real > framebuffer in VRAM manually. Using "lsdc.dirty_update=3D1" in the commma= nd > line will enable this driver mode. >=20 > LS7A1000 have a 32x32 harware cursor, we just let the two CRTC share it > simply with the help of universe plane. LS7A2000 have two 64x64 harware > cursor. Surport for LS7A2000 is on the way. >=20 > In short, we have built-in gpio emulated i2c support, we also have hardwa= re > cursor support. The kind of tiny drivers in drm/tiny is not suitable for = us, > we are not "tiny". >=20 > +------+ HyperTransport 3.0 > | DDR4 | | > +------+ | +------------------------------------+ > || MC0 | | LS7A1000 +------------| > +----------+ | | | DDR3 | +------+ > | LS3A4000 |<--------->| +--------+ +-------+ | memory |<->| VRAM | > | CPU |<--------->| | GC1000 | | LSDC | | controller | +------+ > +----------+ | +--------+ +-+---+-+ +------------| > || MC1 +---------------|---|----------------+ > +------+ | | > | DDR4 | +-------+ DVO0 | | DVO1 +------+ > +------+ VGA <--|ADV7125|<---------+ +------->|TFP410|--> DVI/HDMI > +-------+ +------+ >=20 > The above picture give a simple usage of LS7A1000, note that the encoder > is not necessary adv7125 or tfp410, it is a choice of the downstream board > manufacturer. Other candicate encoder can be ch7034b, sil9022 and ite66121 > etc. Therefore, we need device tree to provide board specific information. > Besides, the dc in both ls2k1000 and ls7k1000 have the vendor:device id of > 0x0014:0x7a06, the reverison id is also same. We can't tell it apart simp= ly > (this is the firmware engineer's mistake). But firmware already flushed to > the board and borad already sold out, we choose to resolve those issues by > introduing device tree with board specific device support. >=20 > For lsdc, there is only a 1:1 mapping of encoders and connectors. >=20 > +-------------------+ _________ > | | | | > | CRTC0 --> DVO0 ---------> Encoder0 --> Connector0 ---> | Monitor | > | | ^ ^ |_________| > | | | | > | <----- i2c0 ----------------+ > | LSDC IP CORE | > | <----- i2c1 ----------------+ > | | | | _________ > | | | | | | > | CRTC1 --> DVO1 ---------> Encoder1 --> Connector1 ---> | Panel | > | | |_________| > +-------------------+ >=20 > Below is a brief introduction of loongson's CPU, bridge chip and SoC. > LS2K1000 is a double core 1.0Ghz mips64r2 compatible SoC[1]. LS7A1000 is > a bridge chip made by Loongson corporation which act as north and/or south > bridge of loongson's desktop and server level processor. It is equivalent > to AMD RS780E+SB710 or something like that. More details can be read from > its user manual[2]. >=20 > This bridge chip is typically use with LS3A3000, LS3A4000 and LS3A5000 cp= u. > LS3A3000 is 4 core 1.45gHz mips64r2 compatible cpu. > LS3A4000 is 4 core 1.8gHz mips64r5 compatible cpu. > LS3A5000 is 4 core 2.5gHz loongarch cpu[3]. >=20 > Nearly all mordern loongson CPU's cache coherency is maintained by hardwa= re, > except for early version of ls2k1000. So we using cached coherent memory = by > default, not writecombine. >=20 > v2: fixup warnings reported by kernel test robot >=20 > v3: fix more grammar mistakes in Kconfig reported by Randy Dunlap and give > more details about lsdc. >=20 > v4: > 1) Add dts required and explain why device tree is required. > 2) Give more description about lsdc and vram helper base driver. > 3) Fix warnings reported by kernel test robot. > 4) Introduce stride_alignment member into struct lsdc_chip_desc, the > stride alignment is 256 bytes for ls7a1000, ls2k1000 and ls2k0500 S= oC. > But ls7a2000 improve it to 32 bytes, We are prepare for extend the > support for the on coming device. >=20 > v5: > 1) using writel and readl replace writeq and readq, to fix kernel test > robot report build error on other archtecture > 2) set default fb format to XRGB8888 at crtc reset time. > 3) fix typos. >=20 > v6: > 1) Explain why we are not switch to drm dridge subsystem on ls2k1000. > 2) Explain why tiny drm driver is not suitable for us. > 3) Give a short description of the trival dirty uppdate implement based > on CMA helper. > 4) code clean up >=20 > [1] https://wiki.debian.org/InstallingDebianOn/Lemote/Loongson2K1000 > [2] https://loongson.github.io/LoongArch-Documentation/Loongson-7A1000-us= ermanual-EN.html > [3] https://loongson.github.io/LoongArch-Documentation/Loongson-3A5000-us= ermanual-EN.html >=20 > Reported-by: Randy Dunlap > Reported-by: kernel test robot > Signed-off-by: suijingfeng > Signed-off-by: Sui Jingfeng <15330273260@189.cn> > --- > drivers/gpu/drm/Kconfig | 2 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/lsdc/Kconfig | 38 ++ > drivers/gpu/drm/lsdc/Makefile | 15 + > drivers/gpu/drm/lsdc/lsdc_connector.c | 443 ++++++++++++++ > drivers/gpu/drm/lsdc/lsdc_connector.h | 60 ++ > drivers/gpu/drm/lsdc/lsdc_crtc.c | 440 ++++++++++++++ > drivers/gpu/drm/lsdc/lsdc_drv.c | 846 ++++++++++++++++++++++++++ > drivers/gpu/drm/lsdc/lsdc_drv.h | 216 +++++++ > drivers/gpu/drm/lsdc/lsdc_encoder.c | 79 +++ > drivers/gpu/drm/lsdc/lsdc_i2c.c | 220 +++++++ > drivers/gpu/drm/lsdc/lsdc_i2c.h | 61 ++ > drivers/gpu/drm/lsdc/lsdc_irq.c | 77 +++ > drivers/gpu/drm/lsdc/lsdc_irq.h | 37 ++ > drivers/gpu/drm/lsdc/lsdc_plane.c | 681 +++++++++++++++++++++ > drivers/gpu/drm/lsdc/lsdc_pll.c | 657 ++++++++++++++++++++ > drivers/gpu/drm/lsdc/lsdc_pll.h | 109 ++++ > drivers/gpu/drm/lsdc/lsdc_regs.h | 246 ++++++++ > 18 files changed, 4228 insertions(+) > create mode 100644 drivers/gpu/drm/lsdc/Kconfig > create mode 100644 drivers/gpu/drm/lsdc/Makefile > create mode 100644 drivers/gpu/drm/lsdc/lsdc_connector.c > create mode 100644 drivers/gpu/drm/lsdc/lsdc_connector.h > create mode 100644 drivers/gpu/drm/lsdc/lsdc_crtc.c > create mode 100644 drivers/gpu/drm/lsdc/lsdc_drv.c > create mode 100644 drivers/gpu/drm/lsdc/lsdc_drv.h > create mode 100644 drivers/gpu/drm/lsdc/lsdc_encoder.c > create mode 100644 drivers/gpu/drm/lsdc/lsdc_i2c.c > create mode 100644 drivers/gpu/drm/lsdc/lsdc_i2c.h > create mode 100644 drivers/gpu/drm/lsdc/lsdc_irq.c > create mode 100644 drivers/gpu/drm/lsdc/lsdc_irq.h > create mode 100644 drivers/gpu/drm/lsdc/lsdc_plane.c > create mode 100644 drivers/gpu/drm/lsdc/lsdc_pll.c > create mode 100644 drivers/gpu/drm/lsdc/lsdc_pll.h > create mode 100644 drivers/gpu/drm/lsdc/lsdc_regs.h >=20 > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index dfdd3ec5f793..18de1485e2ed 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -405,6 +405,8 @@ source "drivers/gpu/drm/gud/Kconfig" > =20 > source "drivers/gpu/drm/sprd/Kconfig" > =20 > +source "drivers/gpu/drm/lsdc/Kconfig" > + > config DRM_HYPERV > tristate "DRM Support for Hyper-V synthetic video device" > depends on DRM && PCI && MMU && HYPERV > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile > index 8675c2af7ae1..2c5a76ced323 100644 > --- a/drivers/gpu/drm/Makefile > +++ b/drivers/gpu/drm/Makefile > @@ -133,3 +133,4 @@ obj-y +=3D xlnx/ > obj-y +=3D gud/ > obj-$(CONFIG_DRM_HYPERV) +=3D hyperv/ > obj-$(CONFIG_DRM_SPRD) +=3D sprd/ > +obj-$(CONFIG_DRM_LSDC) +=3D lsdc/ > diff --git a/drivers/gpu/drm/lsdc/Kconfig b/drivers/gpu/drm/lsdc/Kconfig > new file mode 100644 > index 000000000000..7ed1b0fdbe1b > --- /dev/null > +++ b/drivers/gpu/drm/lsdc/Kconfig > @@ -0,0 +1,38 @@ > +config DRM_LSDC > + tristate "DRM Support for loongson's display controller" > + depends on DRM && PCI > + depends on MACH_LOONGSON64 || LOONGARCH || MIPS || COMPILE_TEST > + select OF > + select CMA if HAVE_DMA_CONTIGUOUS > + select DMA_CMA if HAVE_DMA_CONTIGUOUS > + select DRM_KMS_HELPER > + select DRM_KMS_FB_HELPER > + select DRM_GEM_CMA_HELPER > + select VIDEOMODE_HELPERS > + select BACKLIGHT_PWM if CPU_LOONGSON2K > + select I2C_GPIO if CPU_LOONGSON2K > + select I2C_LS2X if CPU_LOONGSON2K > + default m > + help > + This is a KMS driver for the display controller in the LS7A1000 > + bridge chip and LS2K1000 SoC. The display controller has two > + display pipes and it is a PCI device. > + When using this driver on LS2K1000/LS2K0500 SoC, its framebuffer > + is located at system memory. > + If "M" is selected, the module will be called lsdc. > + > + If in doubt, say "Y". > + > +config DRM_LSDC_VRAM_DRIVER > + bool "vram helper based device driver support" > + depends on DRM_LSDC > + select DRM_VRAM_HELPER > + default y > + help > + When using this driver on LS7A1000 + LS3A3000/LS3A4000/LS3A5000 > + platform, the LS7A1000 bridge chip has dedicated video RAM. Using > + "lsdc.use_vram_helper=3D1" in the kernel command line will enable > + this driver mode and then the framebuffer will be located at the > + VRAM at the price of losing PRIME support. > + > + If in doubt, say "Y". This doesn't sound right. The driver should make the proper decision depending on the platform, not the user or the distribution. > diff --git a/drivers/gpu/drm/lsdc/Makefile b/drivers/gpu/drm/lsdc/Makefile > new file mode 100644 > index 000000000000..342990654478 > --- /dev/null > +++ b/drivers/gpu/drm/lsdc/Makefile > @@ -0,0 +1,15 @@ > +# > +# Makefile for the lsdc drm device driver. > +# > + > +lsdc-y :=3D \ > + lsdc_drv.o \ > + lsdc_crtc.o \ > + lsdc_irq.o \ > + lsdc_plane.o \ > + lsdc_pll.o \ > + lsdc_i2c.o \ > + lsdc_encoder.o \ > + lsdc_connector.o > + > +obj-$(CONFIG_DRM_LSDC) +=3D lsdc.o > diff --git a/drivers/gpu/drm/lsdc/lsdc_connector.c b/drivers/gpu/drm/lsdc= /lsdc_connector.c > new file mode 100644 > index 000000000000..ae5fc0c90961 > --- /dev/null > +++ b/drivers/gpu/drm/lsdc/lsdc_connector.c > @@ -0,0 +1,443 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright 2020 Loongson Corporation > + * > + * Permission is hereby granted, free of charge, to any person obtaining= a > + * copy of this software and associated documentation files (the > + * "Software"), to deal in the Software without restriction, including > + * without limitation the rights to use, copy, modify, merge, publish, > + * distribute, sub license, and/or sell copies of the Software, and to > + * permit persons to whom the Software is furnished to do so, subject to > + * the following conditions: > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRE= SS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILI= TY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SH= ALL > + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY= CLAIM, > + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR > + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR= THE > + * USE OR OTHER DEALINGS IN THE SOFTWARE. > + * > + * The above copyright notice and this permission notice (including the > + * next paragraph) shall be included in all copies or substantial portio= ns > + * of the Software. > + */ That's the MIT license, yet you claim the driver to be licensed under the GPLv2 or later? > + > +/* > + * Authors: > + * Sui Jingfeng > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include