lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 14 Jun 2023 00:20:58 +0800
From:   Sui Jingfeng <suijingfeng@...ngson.cn>
To:     WANG Xuerui <kernel@...0n.name>, Sui Jingfeng <15330273260@....cn>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>, Li Yi <liyi@...ngson.cn>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Christian Koenig <christian.koenig@....com>,
        Emil Velikov <emil.l.velikov@...il.com>
Cc:     linaro-mm-sig@...ts.linaro.org, loongson-kernel@...ts.loongnix.cn,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        Javier Martinez Canillas <javierm@...hat.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Liu Peibao <liupeibao@...ngson.cn>, linux-media@...r.kernel.org
Subject: Re: [PATCH v14 1/2] drm: add kms driver for loongson display
 controller

Hi,

On 2023/5/21 20:21, WANG Xuerui wrote:
>> +
>> +static int __init loongson_module_init(void)
>> +{
>> +    struct pci_dev *pdev = NULL;
>> +
>> +    if (video_firmware_drivers_only())
>> +        return -ENODEV;
>> +
>> +    /* Multiple video card workaround */
>> +    while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev))) {
>> +        if (pdev->vendor != PCI_VENDOR_ID_LOONGSON) {
>> +            pr_info("Discrete graphic card detected, abort\n");
>
> Why is it that the iGPU cannot be used together with a dGPU? I can't 
> see why this is technically the case so some more explanations could 
> be beneficial to other readers and LoongArch devs.


We will remote this workaround at next version. we find some way to keep 
multiple GPU driver co-exixt in the system. The reason we choose to 
workaround is because it  is both easy and effective to solve bugs.


After the dGPU is mounted on the motherboard,

1) the integrate register don't receive write or read access anymore.  
sometime cause its can't receive vblank interrupt, causing vblank 
timeout etc.

Have something to do with the PCI driver layer and/or PCI/vgaarb layer.


2) For ls7a1000, both the display controller and gpu is special,

     when dGPU is mounted, we are multiple gpu system.

     we should made the vgaarb works correct , this is relay on firmware 
and efi  support to be complete.

    In the past, our system don't support firmware framebuffer even.

3) It need us we implement PRIME, for cross driver buffer sharing.

      loongson display don't has scatter-gather able DMA. Can't access 
non physical contiguous GTT buffer.

     We can only expect

    1) the CPU do the copy.

    2) DC driver export dumb buffer, and GPU driver import this buffer, 
and resolve the tiled buffer to the linear.

    3) shared buffer has to pinned at GTT


4) Using space X server also has bug for parser the PCI device on 
complex patch.


5) Even on X86, there are motherboard vendor choose to black the iGPU 
when the dGPU is mounted.

It perhaps better black the iGPU at firmware layer.

But our firmware engineer don't know about this for a very long time.


But as its already as is, we will try to improve this at the next version.

-- 
Jingfeng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ