Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp770603yba; Wed, 3 Apr 2019 19:59:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvCj1VA7QgSxKB7BzMC7o6DbqSOSEbxEyaGXrbaZAN0z/XDvemBAmi8DPI2wsz0prn41hz X-Received: by 2002:a63:cc0a:: with SMTP id x10mr3157439pgf.179.1554346761655; Wed, 03 Apr 2019 19:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554346761; cv=none; d=google.com; s=arc-20160816; b=IphkkmrFRR7Mn6S8x6aCaBl/lOzLY9nOYM3Wflhtx54xlfFinPn8ga8vi6oiVA+ryj k489fhQzFQ+vcyr7NH19zoLn1xKFUmEqPwuPcYqeCMkGCfI+veG/Q4Q9NgIQzhahACBV CWCb3qo0Y/7D9v+0KjCOzFPyzHDKkqhqJ7V1ZquUF2k4iwhQbVnxxMpp/gHaLGy6ALWm 1u2I2DWAFc/9xqBb8eQbFA+We7TP/+c7zdw9LCPb1mRpWZ3ssWD6t9268mjXrZ6bXQLP d4OTCfXMvuiPj0DLpEBq3hxyOngflhLwM/suh+hwfL/nF7X3yz08F6bjWfPGZNjM1mjo ODUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=6cotQbwFsk2qIDHYtzr/C8+Nk1eKu83AkZtm4cvBq2s=; b=EVjVUSnoTcwIjm6j3WazZrmb7otqOVAicXZfGcoNb9a/nDcmMi3ZmxVaSP+Q1mH0Lt j9HjvVQhttnLb9SpVcPRLZNzrTK1MJmv2dxUYEPldCjr2Qk0Lw5ML7CgKevPzXy9MJ// VF4AQLct9YGmJ0yNGNvwyY3hjl2ulnfb8ZbDAER/vK4Jm7YOBcVuWMELTHuXNobOF96K b7ZYkpAfcUA3DO0k6cYDyD+y7kmZhcgWN4+28aUtd6mA48vW3Tfj0EykKqaGHAz7+39X 4Xd91mzWREUXAmDaXTjEUyudXrT6eL4ljqmCtqyvG6qKOn2O+zJBtbY2JlXMnNHGUcOH /KDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18si15269902pgk.289.2019.04.03.19.59.05; Wed, 03 Apr 2019 19:59:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbfDDC6X (ORCPT + 99 others); Wed, 3 Apr 2019 22:58:23 -0400 Received: from mail-vk1-f193.google.com ([209.85.221.193]:37175 "EHLO mail-vk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbfDDC6W (ORCPT ); Wed, 3 Apr 2019 22:58:22 -0400 Received: by mail-vk1-f193.google.com with SMTP id o187so290621vkg.4 for ; Wed, 03 Apr 2019 19:58:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6cotQbwFsk2qIDHYtzr/C8+Nk1eKu83AkZtm4cvBq2s=; b=GKVumT6Of/tu04Z6zYqnMoPs+bVHT580C9FlTX0x6+E/m+ZCMtPs01uLmvbbOtba3G ND0mT5wgRVfkqvT3uB70s1yfaiwlXrI8HG6y4HE1sxjsYbyZ64CnjOzmyuScMpQJIFwm dWC94SybDcTUaoqIN7yxX12YLZ/ELvngYVmOcb66O6rlOmNs6aCUWZ6mG+BJCszo2MV9 8lKaRqicv0Q8t5d33x8aRRa3VZZNdhmFlIA5AxEfNpBLc8Bbis9HmNTXK6z5m6ryZ3fw hZGpdrYdxCCkrb9jQzejePCQ82mepx6VoujeSBq+D8y7QzhgTIGjyw6lhIXk0S9jbJxg t3sg== X-Gm-Message-State: APjAAAXW/xz+P0KEHipe5Dc9kDUWB2DRYKrCrdl5b9nLGjNRZoEw6tDg Hz9rBY6Tzp/5Xc+3rbgvgCKrKU/+R207e5BdJvvFtQ== X-Received: by 2002:a1f:9991:: with SMTP id b139mr2330772vke.73.1554346701563; Wed, 03 Apr 2019 19:58:21 -0700 (PDT) MIME-Version: 1.0 References: <20190403072318.31507-1-kraxel@redhat.com> In-Reply-To: <20190403072318.31507-1-kraxel@redhat.com> From: David Airlie Date: Thu, 4 Apr 2019 12:58:09 +1000 Message-ID: Subject: Re: [PATCH] drm/cirrus: rewrite and modernize driver. To: Gerd Hoffmann Cc: dri-devel , David Airlie , Daniel Vetter , open list , "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 3, 2019 at 5:23 PM Gerd Hoffmann wrote: > > Time to kill some bad sample code people are copying from ;) > > This is a complete rewrite of the cirrus driver. The cirrus_mode_set() > function is pretty much the only function which is carried over largely > unmodified. Everything else is upside down. > > It is a single monster patch. But given that it does some pretty > fundamental changes to the drivers workflow and also reduces the code > size by roughly 70% I think it'll still be alot easier to review than a > longish baby-step patch series. > > Changes summary: > - Given the small amout of video memory (4 MB) the cirrus device has > the rewritten driver doesn't try to manage buffers there. Instead > it will blit (memcpy) the active framebuffer to video memory. Does it get any slower, with TTM I just wrote it to migrate just the frontbuffer in/out of VRAM on modeset, won't we end up with more copies now? > - All gem objects are stored in main memory and are manged using the > new shmem helpers. ttm is out. > - Only DRM_FORMAT_RGB565 (depth 16) is supported. The old driver does > that too by default. There was a module parameter which enables 24/32 > bpp support and disables higher resolutions (due to cirrus hardware > constrains). That parameter wasn't reimplemented. This might be the big sticking point, this is a userspace regression for a feature that was explicitly added a few years ago, can we really get away without it? The rest looks good though! Dave. > - The simple display pipeline is used. > - The generic fbdev emulation is used. > - It's a atomic driver now. >