From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1F4FC433DF for ; Mon, 6 Jul 2020 12:12:29 +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 880432070C for ; Mon, 6 Jul 2020 12:12:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="YI7ioxNJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 880432070C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.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 B88746E364; Mon, 6 Jul 2020 12:12:28 +0000 (UTC) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFCF16E364 for ; Mon, 6 Jul 2020 12:12:27 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id o11so40617703wrv.9 for ; Mon, 06 Jul 2020 05:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:autocrypt:organization:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GaSxmKSD4fAr72vQntjKYLXBJtXn9PUt6QyYqH8rOhw=; b=YI7ioxNJESX51nyyTM+9siMVryklDX87grO84B0gIfhX6SJNS4z2zFff3bs8vOBOYT MY9wxvOcqfzS4+V20gkj2loChTwNEGJEgCPPbTT31Q+XI2mfjfHIwQ3c9w5o3Nul33bG Qrb1ogUUqCt81Q6M9jULvObOxzqn9s/4yYY2Bd2C84assVoYLCZef8xe0LuRoTAp5v6s BVcBXriy/NLU3UTG12LRLVcGTmi/dcDiBe1CT9cuyjNKkIRhB1edXuPWeofVogc2NBF4 z4DV1hmBHKdlF7/s0zYw4c2YKuS7zp0ak7+gWPBM/NRI/cVdCNvCfno0CFC84sPjTUwg igtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=GaSxmKSD4fAr72vQntjKYLXBJtXn9PUt6QyYqH8rOhw=; b=NYR4Lod2CnUOQC/rfqbCzB7UZZlYufOEeHy+J/ZnaD5DKlMXB/j9rRwy/JT5JB6fIZ ehaezqXN0wm9FPuJhc0ZWd03jsqCi9X6wRqpK3bB9rpQcMM3fz9OhuGG3FqPP+KvyiYA bsgr8ozBVm8przd1hswZusDBHHDE2tJnsb/5Sjqozxxo80ciWU42U4fxgXEPCENyYmJ9 WBgfozmiVX+zt90lckpRn9CK/UUQbDjaSJB3h9GN67l76+Lk9+E4RvRyl99cLcOMdqfL uywTcashIGrKmtbf0WFLRM5cWjVFUGw++uNYsdVyx3F/BHC26n+e7MzJ8S3oVt6hh0d6 15JA== X-Gm-Message-State: AOAM530tYTi2NEAyYDRhs4xf8/q42WG4CpED0oT+lIWjVjK0WPDJIDdS DvNLD7mz0cyxKNFV/YV/65bWJhyL4u4tyQ== X-Google-Smtp-Source: ABdhPJzIzHo1GkjTc2vHvn8sv27QDqsPnzIFfNFIlp/KWVvIvXTmr+jX7SzmNYEJv2oYudAoZBuYSQ== X-Received: by 2002:adf:8091:: with SMTP id 17mr35976801wrl.13.1594037546315; Mon, 06 Jul 2020 05:12:26 -0700 (PDT) Received: from ?IPv6:2a01:e35:2ec0:82b0:6959:e617:6562:cabf? ([2a01:e35:2ec0:82b0:6959:e617:6562:cabf]) by smtp.gmail.com with ESMTPSA id z132sm23722179wmb.21.2020.07.06.05.12.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jul 2020 05:12:25 -0700 (PDT) Subject: Re: drm/bridge: Synopsys DW-HDMI bridge driver for the Ingenic JZ4780 (was Re: Specialising the Synopsys DW-HDMI bridge driver for the Ingenic JZ4780) To: Paul Boddie References: <1940005.XIBaf5lNV5@jeremy> <1660901.RzKB6nuZHq@jeremy> <1689d947-b2e1-c023-b2ed-1e9d23c075f3@baylibre.com> <7086465.UhkgK7rEtT@jason> From: Neil Armstrong Autocrypt: addr=narmstrong@baylibre.com; prefer-encrypt=mutual; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKE5laWwgQXJtc3Ryb25nIDxuYXJtc3Ryb25nQGJheW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ame7PB50s73gF/pfQbjw5Wxtes/0FnqydfId95s+eej+17ldGp lMv1ok7K0H/WJSdr7UwDAHEYU++p4RRTJP6DHWXcByVlpNQ4SSAiivmWiwOt490+Ac7ATQRN WQbPAQgAvIoM384ZRFocFXPCOBir5m2J+96R2tI2XxMgMfyDXGJwFilBNs+fpttJlt2995A8 0JwPj8SFdm6FBcxygmxBBCc7i/BVQuY8aC0Z/w9Vzt3Eo561r6pSHr5JGHe8hwBQUcNPd/9l 2ynP57YTSE9XaGJK8gIuTXWo7pzIkTXfN40Wh5jeCCspj4jNsWiYhljjIbrEj300g8RUT2U0 FcEoiV7AjJWWQ5pi8lZJX6nmB0lc69Jw03V6mblgeZ/1oTZmOepkagwy2zLDXxihf0GowUif GphBDeP8elWBNK+ajl5rmpAMNRoKxpN/xR4NzBg62AjyIvigdywa1RehSTfccQARAQABwsBf BBgBAgAJBQJNWQbPAhsMAAoJEBaat7Gkz/iuteIH+wZuRDqK0ysAh+czshtG6JJlLW6eXJJR Vi7dIPpgFic2LcbkSlvB8E25Pcfz/+tW+04Urg4PxxFiTFdFCZO+prfd4Mge7/OvUcwoSub7 ZIPo8726ZF5/xXzajahoIu9/hZ4iywWPAHRvprXaim5E/vKjcTeBMJIqZtS4u/UK3EpAX59R XVxVpM8zJPbk535ELUr6I5HQXnihQm8l6rt9TNuf8p2WEDxc8bPAZHLjNyw9a/CdeB97m2Tr zR8QplXA5kogS4kLe/7/JmlDMO8Zgm9vKLHSUeesLOrjdZ59EcjldNNBszRZQgEhwaarfz46 BSwxi7g3Mu7u5kUByanqHyA= Organization: Baylibre Message-ID: <32cb6f50-1fe1-1484-0512-04590882d35a@baylibre.com> Date: Mon, 6 Jul 2020 14:12:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <7086465.UhkgK7rEtT@jason> Content-Language: en-US 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: Jernej Skrabec , dri-devel@lists.freedesktop.org, Jonas Karlman Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, On 06/07/2020 01:57, Paul Boddie wrote: > Hello, > > On Friday, 15 May 2020 09:43:54 CEST Neil Armstrong wrote: >> >> On 15/05/2020 00:04, Paul Boddie wrote: >>> >>> Well, I've done this but I probably need to know what to look for. One >>> thing that appears regardless of this debugging output being enabled is a >>> problem with the vertical blanking functionality: >>> >>> WARNING: CPU: 1 PID: 396 at drivers/gpu/drm/drm_atomic_helper.c:1457 >>> drm_atomic_helper_wait_for_vblanks+0x1ec/0x25c >>> [CRTC:32:crtc-0] vblank wait timed out >> >> This means the CRTC didn't start, usually because the Pixel clock didn't go >> through the pipeline to the pixel generator, thus not generating >> vblank/vsync interrupts. >> >> You may check if there is not muxes to select the clock source/pixel >> destination. > > It has obviously been a while since I asked about the DW-HDMI functionality. > Since then, I have verified the initialisation of the Ingenic JZ4780 LCD > controller and the Synopsys HDMI peripheral in the L4 Runtime Environment > (running on the Fiasco.OC microkernel), producing a picture and handling > display interrupts. > > Having brought the necessary changes back to the Ingenic DRM driver, I can > make the driver activate the LCD controller and produce vertical blank > interrupts, and these are handled and counted in /proc/interrupts. The > previous errors about timeouts are now gone. > > However, the DRM driver can only be made to start if I set the bus format in > dw_hdmi_bridge_attach: > > u32 bus_format[] = { MEDIA_BUS_FMT_RGB888_1X24 }; > ... > (&connector->display_info, > bus_format, ARRAY_SIZE(bus_format)); > > Without this, the DRM driver will test for a bus format on the connector's > display_info structure in ingenic_drm_encoder_atomic_check and return EINVAL. > There have previously been indications that this should not need to be done, > but I see that other drivers do similar things (for example, ti-tfp410.c). I think this is specific to the ingenic DRM driver, so yeah it may be needed in your case. > > It also seems to be appropriate to set the input_bus_format on the platform- > specific HDMI driver; otherwise, I doubt that appropriate bus encodings will > be chosen in the Synopsys driver. It does but when not provided, it doesn't use it. It's handled in drm_atomic_bridge_chain_select_bus_fmts() : if (conn->display_info.num_bus_formats && conn->display_info.bus_formats) out_bus_fmts[0] = conn->display_info.bus_formats[0]; else out_bus_fmts[0] = MEDIA_BUS_FMT_FIXED; > > [...] > >>> Attempting to set a mode using... >>> >>> modetest -D /dev/dri/card0 -M ingenic-drm -s 34@32:1280x1024-60.02 >>> >>> ...yields the following: >>> >>> failed to set mode: Permission denied >>> setting mode 1280x1024-60.02Hz@XR24 on connectors 34, crtc 32 >> >> This is weird, the command line is ok, is it the same for all modes ? > > Testing against 5.8-rc3 with the above changes seems to have moved the needle > slightly. Although I still get "Input not supported" from my monitor, running > modetest now gives a different error: > > modetest -D /dev/dri/card0 -M ingenic-drm -s 34@32:1280x1024-60.02 > > ...now yields this: > > setting mode 1280x1024-60.02Hz@XR24 on connectors 34, crtc 32 > failed to set gamma: Invalid argument This is because you don't provide the gamma setup ioctl, it's not a fatal error at all. It should be warning since it's optional. Did you check all modes ? > > There also seems to be a card1, but I get the same result with that, and they > both seem to produce similar output with modetest without the -s option. > > Anyway, progress is rather slow trying to figure out the obstruction here, so > any advice would still be appreciated. > > Thanks in advance, > > Paul > > Neil _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel