Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1312072rwe; Thu, 25 Aug 2022 21:47:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR4y8NLX2o5btaQ7QDdnAo4i88g4mxb8EvRUfh5NLbt9APkRexrObWTey4dgHxAyCLvCRE9t X-Received: by 2002:a63:5359:0:b0:41d:b5a6:23c5 with SMTP id t25-20020a635359000000b0041db5a623c5mr1887743pgl.128.1661489254590; Thu, 25 Aug 2022 21:47:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661489254; cv=none; d=google.com; s=arc-20160816; b=V2KRXV2/MEy85NxMalr+VW4E+dWg7VHy9vTM9zMeBFIggVtGGzFKtB2R1zowzWNfV+ qWcZDQZCrqUwsFJyjcy+cH8wX2NwAJPiCIb7rqg4F5WFHZgHs94uv1iwIRK39S0N1dfL TD//G2nrPgKFkK43cVdz6cNw4qBoYx7Cbu6wRqnpvEZ6RXirZwwo81FJflx2RY75Blt4 a1Pkj/q9cfymZHZR5289uGdefCzR4JZVaZ0UTLF34BGpIy6hCkJo3O+b2kVuXH7AmgMu zIsaEGwAPRNdbp7EjWoTmooSOdcoBUhjfjCB5PfNABj1SOHXxgGwAzhvI3oci6ZZz5tH xMEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:dkim-signature; bh=lG3KBGxgM0IZ0jal5mxcI9GiPn0tOppPs9EWUxXKMzc=; b=t3mEZoH4hK+6o4mCCNXaG9qPCyTHdDr6ND2pAgzgM6XZM8KiGhIp22XBMSCoHyuzFf HHuTSekmZl4V/ODYmaVbrYgF8y+gaf/C91TC+9SDrdUbkD950P5zGKbs5PbuvvHRsMqg wFzMh9xH5zNeomgHo97rfiU+IE45FV2KaDTPTv5va8t06TokW+0Ob7RJ0NS4VAxnNwyA hUEJwJcjcT4zW0LWz48rxpJ+ANac986iBPDkk4cWriCjJszCOluCVOj15Nhx2Ji0y+sT G35KFUm4R3VuwVmgsY42r0j+F/cIxTPwnv2j3Xoh3ZI2k+TZxsUxT/O1bPbBIEliU6TH dApQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EUXkPEtj; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020a631504000000b003fdcf4695c8si863602pgl.400.2022.08.25.21.47.17; Thu, 25 Aug 2022 21:47:34 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=EUXkPEtj; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234360AbiHZEHy (ORCPT + 99 others); Fri, 26 Aug 2022 00:07:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230308AbiHZEHw (ORCPT ); Fri, 26 Aug 2022 00:07:52 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9BE2C2EBD for ; Thu, 25 Aug 2022 21:07:51 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id s8so461750ljj.5 for ; Thu, 25 Aug 2022 21:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:from:to:cc; bh=lG3KBGxgM0IZ0jal5mxcI9GiPn0tOppPs9EWUxXKMzc=; b=EUXkPEtjiOsAOCIESOEqHeNyhWwNegFwwh3Lj8+SDfQogvhW95SYMog+dzO7ZbJlkl cnmlffs10Jy62yQ3vsjLGkVxplEH9hCSxi9kEtmnyx+CJSFO4+MKYKXjFvCNrS0EaYrl bmagE/DzPD/eD08koEKLBZ66Q/TTC19wW9aW9k6RCKYWgaaBKcmTirXuLrNH60BuPpYk wimXNdhDydQARpFtKvG1++3xm4MOOSAyltOgd8bEQywrwEP+7vl6FslX5gvxg8WQZspJ ehCG3TToh9lrHtn7KzIr5mPP4gDdPhyUpoUn9ISNB9VaGwkQmf/Lbuj0jOVZAUv0M2SM 9UWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc; bh=lG3KBGxgM0IZ0jal5mxcI9GiPn0tOppPs9EWUxXKMzc=; b=fCUTV91KUDZmIM0oAKx3PKJ1P1QeYXoK/pq/0FNqg8CjahnaelrpGHD36cWA702kbH PCqDgb1awLHUHEwV456lbqXRITbKJIyYIJDu/TUoZFJp5URMSBKdRaUKIUwlSnezRX7W 3kX+C8RmNB13MVOvkdNTVFE2SnFnWnEIzht4MV7IBHoKDH7dXDFVju8zDO4BioERXovG YN+/bIHgaXHjp24djSbl6m2TwHd4dTOmhHyJAhJYeO5A42vztEXjbpcjX91EEubRs0jY 4ovGaMRodVCg4DcOkVdOS0ZG6bqLLMNdTnWuVhwekbFOTlAZL14WNqi1a3AG313ZrW0t S0gQ== X-Gm-Message-State: ACgBeo1/ensWK1YqmcB9Obo6wxP+YgkVi/8fDD7QjtbLh7vdXC55oj0m Dv2nxJCb7sRqzsIqfqY4smQ= X-Received: by 2002:a05:651c:1542:b0:249:5d86:3164 with SMTP id y2-20020a05651c154200b002495d863164mr1851650ljp.500.1661486870019; Thu, 25 Aug 2022 21:07:50 -0700 (PDT) Received: from ?IPV6:2a02:a31a:a240:1700:7563:5c5e:5903:bdb? ([2a02:a31a:a240:1700:7563:5c5e:5903:bdb]) by smtp.googlemail.com with ESMTPSA id k8-20020a2ea268000000b0025e304903f5sm264075ljm.6.2022.08.25.21.07.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 21:07:49 -0700 (PDT) From: Mateusz Kwiatkowski X-Google-Original-From: Mateusz Kwiatkowski Message-ID: <9d9ba040-99d7-25cb-ba10-1c132d7f7663@gmail.com> Date: Fri, 26 Aug 2022 06:07:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH v1 00/35] drm: Analog TV Improvements Content-Language: pl To: Maxime Ripard , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Cc: Jernej Skrabec , Martin Blumenstingl , Chen-Yu Tsai , Philipp Zabel , Jerome Brunet , Samuel Holland , Thomas Zimmermann , Daniel Vetter , Emma Anholt , David Airlie , Maarten Lankhorst , Kevin Hilman , Neil Armstrong , linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Phil Elwell , linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven , Dave Stevenson , linux-amlogic@lists.infradead.org, dri-devel@lists.freedesktop.org, Dom Cobley References: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> <987d6114-5fcb-d668-3b0d-ad6d8723dfdb@tronnes.org> <20220822074800.qzyctchqn5usr55g@houat> <9a15b1cf-692c-1b0d-02a6-316cbd954525@gmail.com> <20220825155506.wqurh5r752qfufqs@houat> <18737c8a-78f4-5b9f-aea2-588bc65c13d9@gmail.com> In-Reply-To: <18737c8a-78f4-5b9f-aea2-588bc65c13d9@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime, Noralf and everyone, Just as a quick update. I isolated the issue to the power management subsystem. Unfortunately I know very little about the power management subsystem so I don't think I can help. There are two alternative dirty ad-hoc hacks that get things working. - Commenting out the pm_runtime_put() / pm_runtime_get_sync() calls in vc4_vec.c - Reverting this PR by Dom Cobley a.k.a. popcornmix:   https://github.com/raspberrypi/linux/pull/4639 Either of these approaches makes VEC mode switching work again. Obviously neither is appropriate for a permanent solution. I tried some random code permutations that came to my mind, like using the vc4_encoder callbacks (e.g. post_crtc_powerdown) instead of the standard enable/disable encoder callbacks, but to no avail. Since the clocks and power management seem to be delegated to the firmware now, my guess is that this might be a firmware issue, but I can't really check all the firmware versions. It certainly crashes on the version currently available in Raspberry Pi OS repos, and on this one: https://github.com/raspberrypi/rpi-firmware/commit/4dde751. My Pi4 doesn't boot using any newer firmware, at least not from USB - I might try some SD card after the weekend. Best regards, Mateusz Kwiatkowski W dniu 25.08.2022 o 18:17, Mateusz Kwiatkowski pisze: > Hi Maxime, > > W dniu 25.08.2022 o 17:55, Maxime Ripard pisze: >> Hi Mateusz, >> >> On Mon, Aug 22, 2022 at 10:57:26AM +0200, Mateusz Kwiatkowski wrote: >>> Hi Maxime, >>> >>> I tried testing and reviewing your changes properly over the last weekend, but >>> ultimately ran into this ("flip_done timed out" etc.) issue and was unable to >>> mitigate it, at least so far. This seems to pop up every time I try to change >>> modes in any way (either change the TV norm, or just try doing >>> "xrandr --output Composite-1 --off" followed by bringing it back on; it also >>> means that the Pi goes unusable when the DE's screen saving routine kicks in). >>> >>> I'm using a Pi 4, and it works with the rpi-5.13.y branch >>> https://github.com/raspberrypi/linux, but seemingly nothing newer. >>> I specifically tried rpi-5.14.y, rpi-5.15.y and rpi-5.19.y - rpi-5.15.y, >>> which is the current main branch in Raspberry Pi OS, seems to be broken since >>> forever; at least since my patches (originally written for 5.10) landed there. >>> >>> I'll try identifying the issue further, possibly later today, and maybe check >>> the rpi-6.0.y branch as well. >> I've tried it this, and I can't reproduce it here. But I'm curious, how >> did you apply this series? rpi-5.13.y is probably full of conflicts >> everywhere? > I applied your patches onto rpi-5.15.y. There were conflicts, but they seemed > relatively minor. I'm not sure if I did a good job at resolving them - I ran > into various problems trying to test your changes, but I chose not to criticize > you before making sure that it's really due to your changes, or without some > remarks more constructive than "doesn't work" ;-) > > I can push my rebase onto some Github fork if you're interested. > > I was able to work around some of those problems, and also saw that some > of them were already mentioned by other reviewers (such as the generic modes > not matching due to the aspect ratio setting). > > Ultimately I got stuck on this bug, so I put testing this series on hold > in favor of debugging the bigger issue. So far unfortunately no luck with it. > > I did not try rebasing your changes onto 5.13 or older. > >> Maxime > Best regards, > Mateusz Kwiatkowski