From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E9D4161310 for ; Wed, 18 Dec 2024 11:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734522107; cv=none; b=qw+vrXO1CqAN4izm+QCQdiA1hdjNp67gPvyn2VSfTEqRhPvZShbGfWH1WQCJvWNBu0YLCLsAnAlWWeLyUSuUty0L/ToiiqKEpCvamMizqmlPtzuk6iVxO09M/qJ6t9VuBYIlyo6zD3e1Ojm4zeehyyuVtZaEfuTraz9e7xbcBuc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734522107; c=relaxed/simple; bh=VHHBHAURYCmWfnBSr8tQ5z7CKlWtJ5SAMR/qb3KuLUs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VuWLKLVithnbHzbc7l1ydiqnXpTRt5NKUYd6e80kgnPkGvqFUNnNuv/CdyivSgq6vogHU4NHFuLozlWH4yysQuTbilnqAdSZvs8mu7u0Sf/ynaJQFhPjyJ29jf7/XoPEps80RLiokTPPJjI/Sw/epHMSD5m0Uy12eAT88sMHaTQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ME/hTpgs; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ME/hTpgs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734522104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8w4RSJ8nHm6xZnbZl8MO53LyH2t95hK0oK0jZZXulZ4=; b=ME/hTpgsfKHLqJe9pRui2xxghlsEUETCXjQxrd2A+e3YFjCFsRXfEO3pJMY97I4aqPmlVN pSraiMHzn7c+OLAJL45AqNF6VPPehDxF4u87i+smLoocUGRYh+D0SClmGBB9GVKoo1Am9o knWS7Oqlw+4wfK0TKAKlrzLLKnnwHz4= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-595-9O-mWEhYMM2SR_ej07o2xg-1; Wed, 18 Dec 2024 06:41:43 -0500 X-MC-Unique: 9O-mWEhYMM2SR_ej07o2xg-1 X-Mimecast-MFC-AGG-ID: 9O-mWEhYMM2SR_ej07o2xg Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-385d80576abso4377646f8f.3 for ; Wed, 18 Dec 2024 03:41:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734522102; x=1735126902; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8w4RSJ8nHm6xZnbZl8MO53LyH2t95hK0oK0jZZXulZ4=; b=h22gHrTztdrInJgapge3v05XZG4UPYqC4JAC//tcA7tNna654+SfMoIOu4FoFc07Nk yiL/fEEHumNWYurdFmZrQs1N6SR268xhbkajlXNhgBaOWOhoPJ3b99nqARGTUO+0xvmg uZpVDfULNUnavl1WbriolfFDlDkjpBFRvPvOVTJWDmqQJScN4Y7xtQFrWwZD9ZcXUovz rQJrMXfFuZpHM2KUKoCSyvANNLn/aun+2bbXjmbERR5YBAjB2tOYY1LuZLEu0NwLuxUY xw99W1pkV4OVBPPojSJs5YhygWg03oL/OpD1ax8Aik2IZmkSdU44jMBDsxpB1Lfe7MHH jVQw== X-Forwarded-Encrypted: i=1; AJvYcCXER6Pm8oCcxK/UAbzGadWyWWLEUiidvurfFMTal32j/y10EKULoHDp+dE/rzOd0n5Tgc3vYkld1Ezyinw=@vger.kernel.org X-Gm-Message-State: AOJu0YzJeIi00D5yw2nu0PbFz37ynoZ1H/diLUVDt7CKPzDYFyxcPk3+ G9XtE2deruMIKlBA3EPh3Jc/CEVei+/Qcg5j9s3UrxI+h2SSVPoPjCzYphJUQeqdfpIjEKemdUs 3sWvqwITCvzYk2Cw3Z5gfgp2/Xtl6V6pwDSMPuuSTufpotzWEPk3tRZVl/Tzqxw== X-Gm-Gg: ASbGnctXPFZEFbjSjRE0w4oWbkUjjzhWRfyA22oIDfWudsfvNXjvpKy8tyV1YQdwzc9 c5TmUQVZfLuhf4jHOflcR5aOmaO5aAKwb8IFrteExgX1mIcS8uEeMZa8F97mS9XnBYhzZePtz0c Qj60dWtQpveywnmzta49Qats2ITLYtM7uBikzl7T+L/ZBEOME07Jv3QgbDjSQ+I+N2V9pnuyeV0 wR+eEYHZZebmaPfVzNCCfdhKXXBb78eJk2DKv10x6yYimNVA5rwObqXXl/fFLIlWsG00k5/xPrr jLYFmT1ZSX7+NlZe4YjI X-Received: by 2002:a05:6000:1a8e:b0:385:fe66:9f32 with SMTP id ffacd0b85a97d-388e4db8a93mr2188142f8f.52.1734522101858; Wed, 18 Dec 2024 03:41:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXwpUv6qcQVeCE77pziR/wtsBppfqPmsEt6PaG1JXb/0c4W+XnvCzSR8Ny47ykr835iY1UfQ== X-Received: by 2002:a05:6000:1a8e:b0:385:fe66:9f32 with SMTP id ffacd0b85a97d-388e4db8a93mr2188100f8f.52.1734522101347; Wed, 18 Dec 2024 03:41:41 -0800 (PST) Received: from ?IPV6:2a01:e0a:c:37e0:ced3:55bd:f454:e722? ([2a01:e0a:c:37e0:ced3:55bd:f454:e722]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b01b7esm17783255e9.13.2024.12.18.03.41.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Dec 2024 03:41:40 -0800 (PST) Message-ID: Date: Wed, 18 Dec 2024 12:41:39 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 0/6] drm/log: Introduce a new boot logger to draw the kmsg on the screen To: Geert Uytterhoeven Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , John Ogness , Javier Martinez Canillas , "Guilherme G . Piccoli" , bluescreen_avenger@verizon.net, Caleb Connolly , Petr Mladek , Jani Nikula , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Linux-Renesas References: <20241204160014.1171469-1-jfalempe@redhat.com> <301714d8-0723-4881-83e8-24523c121bfe@redhat.com> Content-Language: en-US, fr From: Jocelyn Falempe In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 18/12/2024 12:00, Geert Uytterhoeven wrote: > Hi Jocelyn, > > On Wed, Dec 18, 2024 at 11:14 AM Jocelyn Falempe wrote: >> On 17/12/2024 15:54, Geert Uytterhoeven wrote: >>> On Tue, Dec 17, 2024 at 3:46 PM Jocelyn Falempe wrote: >>>> On 17/12/2024 15:19, Geert Uytterhoeven wrote: >>>>> On Wed, Dec 4, 2024 at 6:41 PM Jocelyn Falempe wrote: >>>>>> drm_log is a simple logger that uses the drm_client API to print the kmsg boot log on the screen. >>>>>> This is not a full replacement to fbcon, as it will only print the kmsg. >>>>>> It will never handle user input, or a terminal because this is better done in userspace. >>>>>> >>>>>> If you're curious on how it looks like, I've put a small demo here: >>>>>> https://people.redhat.com/jfalempe/drm_log/drm_log_draft_boot_v2.mp4 >>>>>> >>>>>> Design decisions: >>>>>> * It uses the drm_client API, so it should work on all drm drivers from the start. >>>>>> * It doesn't scroll the message, that way it doesn't need to redraw the whole screen for each new message. >>>>>> It also means it doesn't have to keep drawn messages in memory, to redraw them when scrolling. >>>>>> * It uses the new non-blocking console API, so it should work well with PREEMPT_RT >>>>> >>>>> I gave this a try on Koelsch (R-Car M2-W), using rcar-du. >>>>> Unfortunately I don't see any kernel messages, and my monitor complains >>>>> about no signal. Does this require special support from the driver? >>>> >>>> It doesn't require a special support from the driver. But as it is the >>>> first drm client other than fbdev emulation, I'm not surprised it's >>>> broken on some driver. >>>> I know it works on virtio-gpu, nouveau, amdgpu, and even on a OnePlus 6 >>>> (Qualcomm SDM845/freedreno), without requiring driver changes. >>>> >>>> Do you have a serial console on this device, to check if there is >>>> something in kmsg? >>> >>> Nothing interesting to see. Compared to the fbdev client: >>> >>> rcar-du feb00000.display: [drm] Registered 2 planes with drm panic >>> [drm] Initialized rcar-du 1.0.0 for feb00000.display on minor 0 >>> rcar-du feb00000.display: [drm] Device feb00000.display probed >>> -Console: switching to colour frame buffer device 240x67 >>> -rcar-du feb00000.display: [drm] fb0: rcar-dudrmfb frame buffer device >>> >>> I did verify (by adding my own debug prints) that the code does >>> get to the success case in drm_log_register(). >>> Thanks! >> >> Maybe you need to add console=drm_log to your kernel command line, so >> the kernel will actually use this console. > > Thanks, that does the trick! > > Note that I do not need to specify any console= kernel command line > parameter for the fbdev console. Yes, the fbcon console is tty0, which is hardcoded for historical reason. Some architectures use add_preferred_console() to enable specific consoles, I'm not sure it's allowed to use that from the drm_log_register() code. I will still send a patch to add update the Kconfig help for drm_log, as this command line argument is required to have it working. Best regards, -- Jocelyn > > With > > CONFIG_VT_CONSOLE=y > CONFIG_DRM_CLIENT_DEFAULT_FBDEV=y > > I see all console messages on both the emulated fbdev console and on > the serial console by default. > > Gr{oetje,eeting}s, > > Geert >