summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-07-12drm/panel: simple: fix AUO g185han01 horizontal blankingLucas Stach1-3/+3
The horizontal blanking periods are too short, as the values are specified for a single LVDS channel. Since this panel is dual LVDS they need to be doubled. With this change the panel reaches its nominal vrefresh rate of 60Fps, instead of the 64Fps with the current wrong blanking. Philipp Zabel added: The datasheet specifies 960 active clocks + 40/128/160 clocks blanking on each of the two LVDS channels (min/typical/max), so doubled this is now correct. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/1562764060.23869.12.camel@pengutronix.de
2019-07-12drm/atmel-hlcdc: set layer REP bit to enable replication logicJoshua.Henderson@microchip.com1-1/+1
This bit enables replication logic to expand an RGB color less than 24 bits, to 24 bits, which is used internally for all formats. Otherwise, the least significant bits are always set to zero and the color may not be what is expected. Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/1562686509-8747-1-git-send-email-joshua.henderson@microchip.com
2019-07-12drm/panel: simple: Use display_timing for AUO b101ean01Douglas Anderson1-13/+12
Convert the AUO b101ean01 from using a fixed mode to specifying a display timing with min/typ/max values. The AUO b101ean01's datasheet says: * Vertical blanking min is 12 * Horizontal blanking min is 60 * Pixel clock is between 65.3 MHz and 75 MHz The goal here is to be able to specify the proper timing in device tree to use on rk3288-veyron-minnie to match what the downstream kernel is using so that it can used the fixed PLL. Changes in v4: - display_timing for AUO b101ean01 new for v4. Changes in v6: - Rebased to drm-misc next - Added tags Signed-off-by: Douglas Anderson <dianders@chromium.org> Acked-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190711203455.125667-4-dianders@chromium.org
2019-07-12drm/panel: simple: Use display_timing for Innolux n116bgeDouglas Anderson1-14/+23
Convert the Innolux n116bge from using a fixed mode to specifying a display timing with min/typ/max values. Note that the n116bge's datasheet doesn't fit too well into DRM's way of specifying things. Specifically the panel's datasheet just specifies the vertical blanking period and horizontal blanking period and doesn't break things out. For now we'll leave everything as a fixed value but just allow adjusting the pixel clock. I've added a comment on what the datasheet claims so someone could later expand things to fit their needs if they wanted to test other blanking periods. The goal here is to be able to specify the panel timings in the device tree for several rk3288 Chromebooks (like rk3288-veryon-jerry). These Chromebooks have all been running in the downstream kernel with the standard porches and sync lengths but just with a slightly slower pixel clock because the 76.42 MHz clock is not achievable from the fixed PLL that was available. These Chromebooks only achieve a refresh rate of ~58 Hz. While it's probable that we could adjust the timings to achieve 60 Hz it's probably wisest to match what's been running on these devices all these years. I'll note that though the upstream kernel has always tried to achieve 76.42 MHz, it has actually been running at 74.25 MHz also since the video processor is parented off the same fixed PLL. Changes in v4: - display_timing for Innolux n116bge new for v4. Changes in v5: - Added Heiko's Tested-by Changes in v6: - Rebased to drm-misc next - Added tags Signed-off-by: Douglas Anderson <dianders@chromium.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190711203455.125667-3-dianders@chromium.org
2019-07-12drm/panel: simple: Add ability to override typical timingSean Paul1-5/+104
This patch adds the ability to override the typical display timing for a given panel. This is useful for devices which have timing constraints that do not apply across the entire display driver (eg: to avoid crosstalk between panel and digitizer on certain laptops). The rules are as follows: - panel must not specify fixed mode (since the override mode will either be the same as the fixed mode, or we'll be unable to check the bounds of the overried) - panel must specify at least one display_timing range which will be used to ensure the override mode fits within its bounds Changes in v2: - Parse the full display-timings node (using the native-mode) (Rob) Changes in v3: - No longer parse display-timings subnode, use panel-timing (Rob) Changes in v4: - Don't add mode from timing if override was specified (Thierry) - Add warning if timing and fixed mode was specified (Thierry) - Don't add fixed mode if timing was specified (Thierry) - Refactor/rename a bit to avoid extra indentation from "if" tests - i should be unsigned (Thierry) - Add annoying WARN_ONs for some cases (Thierry) - Simplify 'No display_timing found' handling (Thierry) - Rename to panel_simple_parse_override_mode() (Thierry) Changes in v5: - Added Heiko's Tested-by Changes in v6: - Rebased to drm-misc next - Added tags Cc: Doug Anderson <dianders@chromium.org> Cc: Eric Anholt <eric@anholt.net> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Jeffy Chen <jeffy.chen@rock-chips.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Stéphane Marchesin <marcheu@chromium.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sean Paul <seanpaul@chromium.org> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190711203455.125667-2-dianders@chromium.org
2019-07-12drm/vkms: Rename vkms_crc.c into vkms_composer.cRodrigo Siqueira6-97/+101
As a preparation work for introducing writeback to vkms, this patch renames the file vkms_crc.c into vkms_composer.c. Accordingly, it also adjusts the functions and data structures to match the changes. No functional change. Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/dea62063077ebf5cc1dfce8876e56788d15367e6.1561491964.git.rodrigosiqueiramelo@gmail.com
2019-07-12drm/vkms: Avoid assigning 0 for possible_crtcRodrigo Siqueira4-8/+8
When vkms invoke drm_universal_plane_init(), it sets 0 for possible_crtcs parameter which means that planes can't be attached to any CRTC. It currently works due to some safeguard in the drm_crtc file; however, it is possible to identify the problem by trying to append a second connector. This patch fixes this issue by modifying vkms_plane_init() to accept an index parameter which makes the code a little bit more flexible and avoid set zero to possible_crtcs. Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/d67849c62a8d8ace1a0af455998b588798a4c45f.1561491964.git.rodrigosiqueiramelo@gmail.com
2019-07-10drm/kms: Catch mode_object lifetime errorsDaniel Vetter2-2/+6
Only dynamic mode objects, i.e. those which are refcounted and have a free callback, can be added while the overall drm_device is visible to userspace. All others must be added before drm_dev_register and removed after drm_dev_unregister. Small issue around drivers still using the load/unload callbacks, we need to make sure we set dev->registered so that load/unload code in these callbacks doesn't trigger false warnings. Only a small adjustement in drm_dev_register was needed. Motivated by some irc discussions about object ids of dynamic objects like blobs become invalid, and me going on a bit an audit spree. Reviewed-by: Sean Paul <sean@poorly.run> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190614061723.1173-1-daniel.vetter@ffwll.ch
2019-07-09drm/client: remove the exporting of drm_client_closeDenis Efremov1-1/+0
The function drm_client_close is declared as static and marked as EXPORT_SYMBOL. It's a bit confusing for an internal function to be exported. The area of visibility for such function is its .c file and all other modules. Other *.c files of the same module can't use it, despite all other modules can. Relying on the fact that this is the internal function and it's not a crucial part of the API, the patch removes the EXPORT_SYMBOL marking of drm_client_close. Signed-off-by: Denis Efremov <efremov@linux.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190703170150.32548-1-efremov@linux.com
2019-07-09drm/mgag200: Replace struct mga_fbdev with generic framebuffer emulationThomas Zimmermann5-382/+6
This patch replaces mgag200's framebuffer console with DRM's generic implememtation. All respective code is being removed from the driver. The console is set up with a shadow buffer. The actual buffer object is not permanently pinned in video ram, but just another buffer object that the driver moves in and out of vram as necessary. The driver's function mga_crtc_do_set_base() used to contain special handling for the framebuffer console. With the new generic framebuffer, the driver does not need this code an longer. For consistency, this patch also changes the preferred framebuffer depth. The original code used 24 bpp by default and 32 bpp for the framebuffer. As 24 bpp is not well supported by userspace anyway, setting 32 bpp as default makes sense. v2: * rely on fbdev helpers error messages * document changes to preferred depth * dirty function no longer required Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/315832/
2019-07-09drm/bochs: Use shadow buffer for bochs framebuffer consoleThomas Zimmermann1-0/+1
The bochs driver (and virtual hardware) requires buffer objects to reside in video ram to display them to the screen. So it can not display the framebuffer console because the respective buffer object is permanently pinned in system memory. Using a shadow buffer for the console solves this problem. The console emulation will pin the buffer object only during updates from the shadow buffer. Otherwise, the bochs driver can freely relocated the buffer between system memory and video ram. v2: * select shadow FB via struct drm_mode_config.prefer_shadow_fbdev Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/315833/
2019-07-09drm/ast: Replace struct ast_fbdev with generic framebuffer emulationThomas Zimmermann6-392/+5
This patch replaces ast's framebuffer console with DRM's generic implememtation. All respective code is being removed from the driver. The console is set up with a shadow buffer. The actual buffer object is not permanently pinned in video ram, but just another buffer object that the driver moves in and out of vram as necessary. The driver's function ast_crtc_do_set_base() used to contain special handling for the framebuffer console. With the new generic framebuffer, the driver does not need this code an longer. v2: * use drm_fb_helper_set_suspend_unlocked() in ast_drm_{thaw,freeze}() * dirty function no longer required Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/315835/
2019-07-09drm/fb-helper: Instanciate shadow FB if configured in device's mode_configThomas Zimmermann2-3/+22
Generic framebuffer emulation uses a shadow buffer for framebuffers with dirty() function. If drivers want to use the shadow FB without such a function, they can now set prefer_shadow or prefer_shadow_fbdev in their mode_config structures. The former flag is exported to userspace, the latter flag is fbdev-only. v3: * only schedule dirty worker if fbdev uses shadow fb * test shadow fb settings with boolean operators * use bool for struct drm_mode_config.prefer_shadow_fbdev * fix documentation comments Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Tested-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/315834/
2019-07-09drm/fb-helper: Map DRM client buffer only when requiredThomas Zimmermann2-20/+29
This patch changes DRM clients to not map the buffer by default. The buffer, like any buffer object, should be mapped and unmapped when needed. An unmapped buffer object can be evicted to system memory and does not consume video ram until displayed. This allows to use generic fbdev emulation with drivers for low-memory devices, such as ast and mgag200. This change affects the generic framebuffer console. HW-based consoles map their console buffer once and keep it mapped. Userspace can mmap this buffer into its address space. The shadow-buffered framebuffer console only needs the buffer object to be mapped during updates. While not being updated from the shadow buffer, the buffer object can remain unmapped. Userspace will always mmap the shadow buffer. v2: * change DRM client to not map buffer by default * manually map client buffer for fbdev with HW framebuffer Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/315830/
2019-07-09drm/client: Support unmapping of DRM client buffersThomas Zimmermann2-10/+58
DRM clients, such as the fbdev emulation, have their buffer objects mapped by default. Mapping a buffer implicitly prevents its relocation. Hence, the buffer may permanently consume video memory while it's allocated. This is a problem for drivers of low-memory devices, such as ast, mgag200 or older framebuffer hardware, which will then not have enough memory to display other content (e.g., X11). This patch introduces drm_client_buffer_vmap() and _vunmap(). Internal DRM clients can use these functions to unmap and remap buffer objects as needed. There's no reference counting for vmap operations. Callers are expected to either keep buffers mapped (as it is now), or call vmap and vunmap in pairs around code that accesses the mapped memory. v2: * remove several duplicated NULL-pointer checks v3: * style and typo fixes Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/315831/
2019-07-09drm/sti: Try to fix up the tvout possible clonesVille Syrjälä1-3/+7
The current possible_clones setup doesn't look sensible. I'm assuming the 0 and 1 are supposed to refer to the indexes of the hdmi and hda encoders? So it kinda looks like we want hda+hdmi cloning, but then dvo also claims to be cloneable with hdmi, but hdmi won't recipricate. Benjamin tells me all encoders should be cloneable with each other, so let's fix up the masks to indicate that. Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190708162048.4286-5-ville.syrjala@linux.intel.com
2019-07-09drm/sti: Remove pointless castsVille Syrjälä1-3/+3
There's no point in the cast for accessing the base class. Just take the address of the struct instead. Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190708162048.4286-4-ville.syrjala@linux.intel.com
2019-07-08dt-bindings: display: Convert sgd,gktw70sdae4se panel to DT schemaRob Herring2-41/+68
Convert the sgd,gktw70sdae4se LVDS panel binding to DT schema. Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-14-robh@kernel.org
2019-07-08dt-bindings: display: Convert mitsubishi,aa121td01 panel to DT schemaRob Herring2-47/+74
Convert the mitsubishi,aa121td01 LVDS panel binding to DT schema. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-13-robh@kernel.org
2019-07-08dt-bindings: display: Convert mitsubishi,aa104xd12 panel to DT schemaRob Herring2-47/+75
Convert the mitsubishi,aa104xd12 LVDS panel binding to DT schema. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-12-robh@kernel.org
2019-07-08dt-bindings: display: Convert innolux,ee101ia-01 panel to DT schemaRob Herring2-7/+31
Convert the innolux,ee101ia-01 LVDS panel binding to DT schema. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-11-robh@kernel.org
2019-07-08dt-bindings: display: Convert panel-lvds to DT schemaRob Herring2-121/+107
Convert the panel-lvds binding to use DT schema. The panel-lvds schema inherits from the panel-common.yaml schema and specific LVDS panel bindings should inherit from this schema. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-10-robh@kernel.org
2019-07-08dt-bindings: display: Convert tfc,s9700rtwv43tr-01b panel to DT schemaRob Herring2-15/+33
Convert the tfc,s9700rtwv43tr-01b panel binding to DT schema. Cc: Heiko Stuebner <heiko.stuebner@bq.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-9-robh@kernel.org
2019-07-08dt-bindings: display: Convert raspberrypi,7inch-touchscreen panel to DT schemaRob Herring2-49/+71
Convert the raspberrypi,7inch-touchscreen panel binding to DT schema. Cc: Eric Anholt <eric@anholt.net> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-8-robh@kernel.org
2019-07-08dt-bindings: display: Convert pda,91-00156-a0 panel to DT schemaRob Herring2-14/+31
Convert the pda,91-00156-a0 panel binding to DT schema. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-7-robh@kernel.org
2019-07-08dt-bindings: display: Convert dlc,dlc0700yzg-1 panel to DT schemaRob Herring2-13/+31
Convert the dlc,dlc0700yzg-1 panel binding to DT schema. Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-6-robh@kernel.org
2019-07-08dt-bindings: display: Convert bananapi,s070wv20-ct16 panel to DT schemaRob Herring2-12/+31
Convert the bananapi,s070wv20-ct16 panel binding to DT schema. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-5-robh@kernel.org
2019-07-08dt-bindings: display: Convert armadeus,st0700-adapt panel to DT schemaRob Herring2-9/+33
Convert the armadeus,st0700-adapt panel binding to DT schema. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-4-robh@kernel.org
2019-07-08dt-bindings: display: Convert ampire,am-480272h3tmqw-t01h panel to DT schemaRob Herring2-26/+42
Convert the ampire,am-480272h3tmqw-t01h panel binding to DT schema. Cc: Yannick Fertre <yannick.fertre@st.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-3-robh@kernel.org
2019-07-08dt-bindings: display: Convert common panel bindings to DT schemaRob Herring5-134/+151
Convert the common panel bindings to DT schema consolidating scattered definitions to a single schema file. The 'simple-panel' binding just a collection of properties and not a complete binding itself. All of the 'simple-panel' properties are covered by the panel-common.txt binding with the exception of the 'no-hpd' property, so add that to the schema. As there are lots of references to simple-panel.txt, just keep the file with a reference to common.yaml for now until all the bindings are converted. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: dri-devel@lists.freedesktop.org Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190705164221.4462-2-robh@kernel.org
2019-07-04drm/bridge: ti-sn65dsi86: correct dsi mode_flagsRob Clark1-2/+1
Noticed while comparing register dump of how bootloader configures DSI vs how kernel configures. It seems the bridge still works either way, but fixing this clears the 'CHA_DATATYPE_ERR' error status bit. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190702154419.20812-4-robdclark@gmail.com
2019-07-04drm/bridge: ti-sn65dsi86: add debugfsRob Clark1-0/+42
Add a debugfs file to show status registers. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190702154419.20812-3-robdclark@gmail.com
2019-07-04drm/bridge: ti-sn65dsi86: add link to datasheetRob Clark1-0/+1
The bridge has pretty good docs, lets add a link to make them easier to find. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190702154419.20812-2-robdclark@gmail.com
2019-07-04drm/bridge: sii902x: Make sii902x_audio_digital_mute staticYueHaibing1-1/+2
Fix sparse warning: drivers/gpu/drm/bridge/sii902x.c:665:5: warning: symbol 'sii902x_audio_digital_mute' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190614153623.28708-1-yuehaibing@huawei.com
2019-07-03Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()"Rob Herring4-12/+9
This reverts commit 220df83a5394fbf7c1486ba7848794b7b351d598. Turns out drm_gem_dumb_map_offset really only worked for the dumb buffer case, so revert the name change. Signed-off-by: Rob Herring <robh@kernel.org>
2019-07-03Revert "drm/panfrost: Use drm_gem_map_offset()"Rob Herring1-2/+14
This reverts commit 583bbf46133c726bae277e8f4e32bfba2a528c7f. Turns out we need mmap to work on imported BOs even if the current code is buggy. Signed-off-by: Rob Herring <robh@kernel.org>
2019-07-03drm/vram: Don't export driver callback functions for PRIMEThomas Zimmermann3-74/+29
PRIME functionality is now provided by GEM object functions. The driver callback functions are obsolete. So this patch renames them and turns them into static internal functions of the VRAM helper library. The implementation of gem_prime_mmap is now unused and the patch removes it. v3: * kept each renamed function at its original location within file * kept documentation Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190702115012.4418-6-tzimmermann@suse.de
2019-07-03drm/vbox: Remove empty PRIME functionsThomas Zimmermann4-78/+1
The vbox driver uses VRAM helpers for memory management. These helpers provide a basic implementation of PRIME functions, so the vbox driver's empty implmentation can be removed. As a side effect of this change, vbox can now use generic framebuffer emulation. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190702115012.4418-5-tzimmermann@suse.de
2019-07-03drm/hibmc: Update struct drm_driver for GEM object functionsThomas Zimmermann1-2/+1
The GEM object's free function is now called through struct drm_gem_object_funcs.free. The function struct drm_driver.gem_prime_mmap is now required for mmap'ing GEM objects to userspace. v2: * set drm_driver.gem_prime_mmap to drm_gem_prime_mmap() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190702115012.4418-4-tzimmermann@suse.de
2019-07-03drm/bochs: Remove PRIME helpers from driver structureThomas Zimmermann1-1/+0
VRAM PRIME helpers are now called through GEM object functions. The driver callback functions are obsolete. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190702115012.4418-3-tzimmermann@suse.de
2019-07-03drm/vram: Set GEM object functions for PRIMEThomas Zimmermann2-1/+19
PRIME functionality is now provided via the callback functions in struct drm_gem_object_funcs. The driver-structure functions are obsolete. As a side effect of this patch, VRAM-based drivers get basic PRIME support automatically without having to set any flags or additional fields. v2: - use existing PRIME functions for object's table v3: - move object table to EOF so it can refer to internal interfaces Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190702115012.4418-2-tzimmermann@suse.de
2019-07-02DRM: ingenic: Add support for panels with 8-bit serial busPaul Cercueil1-0/+4
Add support for the LCD panels with a serial 8-bit bus, where the color components of each 24-bit pixel are sent sequentially. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190627182114.27299-3-paul@crapouillou.net # *** extracted tags *** Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
2019-07-02DRM: ingenic: Add support for Sharp panelsPaul Cercueil1-23/+41
Add support for the LCD panels that must be driven with the Sharp-specific signals SPL, CLS, REV, PS. An example of such panel is the LS020B1DD01D supported by the panel-simple DRM panel driver. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190627182114.27299-2-paul@crapouillou.net # *** extracted tags *** Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
2019-07-02DRM: ingenic: Use devm_platform_ioremap_resourcePaul Cercueil1-3/+1
Simplify a bit the probe function by using the newly introduced devm_platform_ioremap_resource(), instead of having to call platform_get_resource() followed by devm_ioremap_resource(). Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190627182114.27299-1-paul@crapouillou.net # *** extracted tags *** Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
2019-07-01drm/bridge: dw-hdmi: Use automatic CTS generation mode when using non-AHB audioNeil Armstrong1-15/+30
When using an I2S source using a different clock source (usually the I2S audio HW uses dedicated PLLs, different from the HDMI PHY PLL), fixed CTS values will cause some frequent audio drop-out and glitches as reported on Amlogic, Allwinner and Rockchip SoCs setups. Setting the CTS in automatic mode will let the HDMI controller generate automatically the CTS value to match the input audio clock. The DesignWare DW-HDMI User Guide explains: For Automatic CTS generation Write "0" on the bit field "CTS_manual", Register 0x3205: AUD_CTS3 The DesignWare DW-HDMI Databook explains : If "CTS_manual" bit equals 0b this registers contains "audCTS[19:0]" generated by the Cycle time counter according to specified timing. Cc: Jernej Skrabec <jernej.skrabec@siol.net> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Jonas Karlman <jonas@kwiboo.se> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190612085147.26971-1-narmstrong@baylibre.com
2019-07-01drm/bridge: tc358767: do a software reset if reset pin isn't connectedLucas Stach1-0/+23
To get the chip into the expected state, even when the hardware reset pin isn't connected, do a software reset in this case. It isn't as thorough as the hardware reset, as the I2C communication block can not be reset for obvious reasons, but it's getting the chip into a defined state. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190627085958.28331-1-l.stach@pengutronix.de
2019-07-01drm/bridge: adv7511: Attach to DSI host at probe timeMatt Redfearn1-3/+9
In contrast to all of the DSI panel drivers in drivers/gpu/drm/panel which attach to the DSI host via mipi_dsi_attach() at probe time, the ADV7533 bridge device does not. Instead it defers this to the point that the upstream device connects to its bridge via drm_bridge_attach(). The generic Synopsys MIPI DSI host driver does not register it's own drm_bridge until the MIPI DSI has attached. But it does not call drm_bridge_attach() on the downstream device until the upstream device has attached. This leads to a chicken and the egg failure and the DRM pipeline does not complete. Since all other mipi_dsi_device drivers call mipi_dsi_attach() in probe(), make the adv7533 mipi_dsi_device do the same. This ensures that the Synopsys MIPI DSI host registers it's bridge such that it is available for the upstream device to connect to. Signed-off-by: Matt Redfearn <matt.redfearn@thinci.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190627151740.2277-1-matt.redfearn@thinci.com
2019-07-01drm/stm: drop use of drmP.hSam Ravnborg1-3/+7
Drop use of the deprecated header file drmP.h from the sole user in the stm driver. Replace with necessary include files. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Yannick Fertre <yannick.fertre@st.com> Cc: Philippe Cornu <philippe.cornu@st.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-4-sam@ravnborg.org
2019-06-30MAINTAINERS: add Sam Ravnborg for drm/atmel_hlcdcSam Ravnborg1-0/+1
I have agreed with Boris Brezillon that we will share the maintainer role for the drm/atmel_hlcdc driver. Nicolas Ferre from Microchip has donated a few boards that allows me to test things - thanks! Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Boris Brezillon <bbrezillon@kernel.org> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Peter Rosin <peda@axentia.se> Link: https://patchwork.freedesktop.org/patch/msgid/20190627211643.GA19853@ravnborg.org
2019-06-30drm/mgag200: drop use of drmP.hSam Ravnborg8-17/+29
Drop use of the deprecated drmP.h header file. Replace with necessary include files to fix build. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190623103542.30697-5-sam@ravnborg.org