{"id":808561,"url":"http://patchwork.ozlabs.org/api/1.0/patches/808561/?format=json","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/1.0/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/"},"msgid":"<20170901072744.2409-4-dja@axtens.net>","date":"2017-09-01T07:27:44","name":"[v3,3/3] drm: documentation for default display device","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"49f2d45332a993e2c2f1a9b8e29a66c1666fdc1f","submitter":{"id":65792,"url":"http://patchwork.ozlabs.org/api/1.0/people/65792/?format=json","name":"Daniel Axtens","email":"dja@axtens.net"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170901072744.2409-4-dja@axtens.net/mbox/","series":[{"id":961,"url":"http://patchwork.ozlabs.org/api/1.0/series/961/?format=json","date":"2017-09-01T07:27:41","name":"Split default display handling out from VGA arbiter","version":3,"mbox":"http://patchwork.ozlabs.org/series/961/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808561/checks/","tags":{},"headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkB051L0Nz9s81\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 17:37:09 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xkB050480zDqk0\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 17:37:09 +1000 (AEST)","from mail-pf0-x242.google.com (mail-pf0-x242.google.com\n\t[IPv6:2607:f8b0:400e:c00::242])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xk9pK3yWvzDqkr\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  1 Sep 2017 17:28:41 +1000 (AEST)","by mail-pf0-x242.google.com with SMTP id r187so1171212pfr.5\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 01 Sep 2017 00:28:41 -0700 (PDT)","from localhost.localdomain (124-171-202-56.dyn.iinet.net.au.\n\t[124.171.202.56]) by smtp.gmail.com with ESMTPSA id\n\tl30sm2430300pgc.61.2017.09.01.00.28.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 01 Sep 2017 00:28:39 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=\"qM/nOp5F\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=\"qM/nOp5F\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=\"qM/nOp5F\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=hKzZfZDxftC+GlONhJGQ7yGmTJlbWNbWPAwxJaUYBVc=;\n\tb=qM/nOp5FZaawNCNnWSpsG7BUzb5cBysXhQwYxANeZzLaQP/nDTmYTd4C8mq/dpOCLQ\n\tQyjwcpMwGhY6Wm7TONFXPYKBXAGZkpOz+9sExyovvb1KwBOX7g9KKjhYP3RB/2SKnzBc\n\tg4fEnZbqhdr7S5REuGwXZqeab+2RBOiQ0aL2E=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=hKzZfZDxftC+GlONhJGQ7yGmTJlbWNbWPAwxJaUYBVc=;\n\tb=X1+yMu1Bah7qiJKSMxLYriSG6s/tAInRq+J2dPWsUEUX/H3orrG13zpnjhOJVikTLq\n\tEf3pFpiXPyh6OWNca/VE561FY1oVwBHHqrWEi149u6lJ5xhqHM9OZxSNOlb5xvETm7Dy\n\toIvoPs4JNKdznoKERZk+qFqBVpzGF1DB4oEajfV84aEoAfJBr01dvAxUh/s+GCBd8iiZ\n\tfAvrzYKv7/l6n43sOAst6stU0qtQlGUbI+nGLlPF5HfG6g7R5ORJeSfb5AvrXBZuLPcl\n\tfD4nOkmO02hKukhb347rgitag4Oy8Iw51+F7J9UbymlM2yjUIhoPDGEGgHcxwRxNItdR\n\trA6A==","X-Gm-Message-State":"AHPjjUhPVB0d310iN4Pm4lRizBWd2fASy2adYpUUdyd+pUoEznW/e/gA\n\tEaknFL1cP+OvYAn5","X-Google-Smtp-Source":"ADKCNb6SF8U4xLPhDN5082K2s+rZHv9cIgmOjvpK88ENEdDVpBCDGexEJAjpJltfhWWUboNsqrIBjQ==","X-Received":"by 10.84.236.79 with SMTP id h15mr1314458pln.393.1504250919790; \n\tFri, 01 Sep 2017 00:28:39 -0700 (PDT)","From":"Daniel Axtens <dja@axtens.net>","To":"linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,\n\tlinux-arm-kernel@lists.infradead.org","Subject":"[PATCH v3 3/3] drm: documentation for default display device","Date":"Fri,  1 Sep 2017 17:27:44 +1000","Message-Id":"<20170901072744.2409-4-dja@axtens.net>","X-Mailer":"git-send-email 2.11.0","In-Reply-To":"<20170901072744.2409-1-dja@axtens.net>","References":"<20170901072744.2409-1-dja@axtens.net>","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"lorenzo.pieralisi@arm.com, gabriele.paoloni@huawei.com,\n\tard.biesheuvel@linaro.org, airlied@linux.ie, will.deacon@arm.com,\n\tdri-devel@lists.freedesktop.org, z.liuxinliang@hisilicon.com,\n\talex.williamson@redhat.com, lukas@wunner.de, helgaas@kernel.org,\n\tcatalin.marinas@arm.com, zourongrong@gmail.com, daniel.vetter@intel.com, \n\tDaniel Axtens <dja@axtens.net>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"},"content":"We have refactored and extended this - document it.\n\nSigned-off-by: Daniel Axtens <dja@axtens.net>\n---\n Documentation/gpu/default_display.rst | 93 +++++++++++++++++++++++++++++++++++\n Documentation/gpu/index.rst           |  1 +\n 2 files changed, 94 insertions(+)\n create mode 100644 Documentation/gpu/default_display.rst","diff":"diff --git a/Documentation/gpu/default_display.rst b/Documentation/gpu/default_display.rst\nnew file mode 100644\nindex 000000000000..3c190611564e\n--- /dev/null\n+++ b/Documentation/gpu/default_display.rst\n@@ -0,0 +1,93 @@\n+=======================\n+Default Display Devices\n+=======================\n+\n+Overview\n+========\n+\n+.. kernel-doc:: drivers/gpu/vga/default_display.c\n+\t\t:doc: overview\n+\n+\n+Why do we need this?\n+====================\n+\n+The default device is used to set the ``boot_vga`` per-device sysfs\n+file, which is used by user-space. Most notably, Xorg reads this file\n+via libpciaccess in order to facilitate auto-configuration.\n+\n+\n+History\n+=======\n+\n+When the VGA arbiter was introduced, it would pick a default device on\n+boot. As the arbiter exists to arbitrate access to legacy resources,\n+it would only pick a card that could be accessed through legacy areas.\n+(See the :doc:`vgaarbiter` documentation for more.)\n+\n+The arbiter was later extended on x86 and IA64 to consider the EFI\n+framebuffer.\n+\n+This is all well and good if you have legacy resources or\n+EFI. However, some systems do not have either of those. For example,\n+on POWER8: [0]_\n+\n+ - There is no IO space at all\n+\n+ - We configure the 32-bit MMIO window to be around 3..4G (to avoid\n+   overlapping with DMA space below it).\n+\n+So effectively, there is no path to the legacy areas.\n+\n+This means the VGA arbiter will not pick a default device on these\n+platforms. So, on powerpc, a class hook was added to mark a default\n+device (``arch/powerpc/kernel/pci-common.c``), independent of the\n+arbiter.\n+\n+When this issue arose on an arm64 system, it was decided that a generic\n+approach would be better than more special cases. Therefore, the\n+default device selection was factored out, and it now operates using\n+the priority list described in the Overview.\n+\n+API\n+===\n+\n+Public\n+------\n+\n+.. kernel-doc:: drivers/gpu/vga/default_display.c\n+\t\t:export:\n+\n+Private\n+-------\n+\n+.. kernel-doc:: drivers/gpu/vga/default_display.c\n+\t\t:internal:\n+\n+Future Work\n+===========\n+\n+There is no support for non-PCI VGA devices being marked as default.\n+The following comment, extracted from an earlier version of\n+:c:func:`pci_default_display()` might help:\n+\n+  If your VGA default device is not PCI, you'll have to override this\n+  and return NULL here. In this case, I assume it will not conflict\n+  with any PCI card. If this is not true, I'll have to define two\n+  archs hooks for enabling/disabling the VGA default device if that\n+  is possible. \n+\n+  This may be a problem with real _ISA_ VGA cards, in addition to a\n+  PCI one. I don't know at this point how to deal with that card. Can\n+  theirs IOs be disabled at all ? If not, then I suppose it's a matter\n+  of having the proper arch hook telling us about it, so we basically\n+  never allow anybody to succeed a ``vga_get()``...\n+\n+Currently there is also no way to support non-VGA-class PCI devices as\n+default display devices.\n+\n+\n+References\n+==========\n+\t   \n+.. [0] https://www.spinics.net/lists/linux-pci/msg64142.html\ndiff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst\nindex 35d673bf9b56..8083d84f2334 100644\n--- a/Documentation/gpu/index.rst\n+++ b/Documentation/gpu/index.rst\n@@ -16,6 +16,7 @@ Linux GPU Driver Developer's Guide\n    tegra\n    tinydrm\n    vc4\n+   default_display\n    vga-switcheroo\n    vgaarbiter\n    bridge/dw-hdmi\n","prefixes":["v3","3/3"]}