From patchwork Tue Apr 2 07:53:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wojciech Macek X-Patchwork-Id: 13613522 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F948C6FD1F for ; Tue, 2 Apr 2024 07:54:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3hHq7kLCvbNfE5tGp2nOuf4SxmfPw/ILv4z4atocALI=; b=naNraLENkqVPfy SA8NLzpietA4gzwaHvjlk3q7chVmgDMfVqwEpmOgDt8jJtefIfEssot9YS720QiejzfAW5wI+Ue8y wQjRPmUYqrG8HpZs8+a/BYQOYoNICIAxiFkgUCLXQWroKF1t4Hhdl3lNggqVV1GfM7uUXZzSBA7kT V54s0iYt8cfdiKdeR5cCAmGwSvoTk5q3UkN095M9K5Ig573C75+J8xAxmlUwJkl3Gd8q0Bdmw9p4e OU6ijIFpUTXipoxjJBfjAoXyDJKPOsGLNSCj7eB+q2En+5KdQD8zo/kK/CXaqLnzj7SsOZl0h8CaS cN0fcTm5gKa48YIziFYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrYyG-0000000A8jW-3P3N; Tue, 02 Apr 2024 07:54:16 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrYy7-0000000A8bd-3MUu for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2024 07:54:13 +0000 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a45f257b81fso489036066b.0 for ; Tue, 02 Apr 2024 00:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712044445; x=1712649245; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=S0aDPStcWplmgXtw121bO/EPEa2tJmV5qvIMipnIN9E=; b=ETdaEYIHKAC1Vqqg4q+oD1s6PM0qBvaCTFiHhJjFMzOqLqLBwgoDrT7ihEmCKlV9Wh QGy696/ba2snth2TqIoe6c8PHjKP7ul2DsQo8RSSguxAAjib01DxSvoCIS/wH+8zfFMd uhPi1HoKhi+qiq4bB/tFfeO3falphrc5ZnKUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712044445; x=1712649245; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=S0aDPStcWplmgXtw121bO/EPEa2tJmV5qvIMipnIN9E=; b=akpUC4hCRog8eXHFlm140Pgm720XSYt8OERQ1bovrDGuYIqJlQ6gBLfNWh8UmWROW3 Ok02sgxA6d3xox1yk8WY78nS/c9dT6Ur62l6dw7wAE1AJgQ36plTCqX7PiXrqZnxsgs2 rby68vYhi65dZlrSzkWEmllsrMQn3zupZxvzk0JfjH4YumILmeU2UhShGfTaGT5DewbM LUUIFlH9HHtxjZfkcln/HPsUT4JpUtAxLR19ZXMFS4IzugSJM6vcg9w5IbPdyqDoYhnd pFnbSZKmyq++0TnKDuibMo5VZLC8pk27Uu4+86Kw0NZcoDtCuJinqirT/vqVd0YBPkfa Mb6Q== X-Forwarded-Encrypted: i=1; AJvYcCUbiNhSyaDaC1If1edOBK0iVliqM5SR8oZQlj7r2lCVf7+ae7ZIQ4/cUjjTsbQnYw1KGwABjS4dJGt843kZ1lVK7Fe0HuIthsNTMxYXPlPfBCyN22k= X-Gm-Message-State: AOJu0Yz9CigkPFDZstdk/Gp+k8GQ2dL5kOgrW9LHcFVPyLUW8ilgpb6F sOZ29RLOHc6VjGpNE79R2hQSCc+krchq9VasRJgoRjTqId98WfnX+FmO6LvM9A== X-Google-Smtp-Source: AGHT+IEO3o3WE2Q6ehT7FdVQbjibduradq+vM90LrmVRkZTLj+wI/38lnWD5V3+vj2JRKKZyNZQGQQ== X-Received: by 2002:a17:906:795:b0:a4e:8e54:7962 with SMTP id l21-20020a170906079500b00a4e8e547962mr403527ejc.41.1712044445152; Tue, 02 Apr 2024 00:54:05 -0700 (PDT) Received: from orzel7.c.googlers.com.com (229.112.91.34.bc.googleusercontent.com. [34.91.112.229]) by smtp.gmail.com with ESMTPSA id k5-20020a170906a38500b00a4761c94a5esm6227359ejz.107.2024.04.02.00.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 00:54:04 -0700 (PDT) From: Wojciech Macek To: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , AngeloGioacchino Del Regno , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev Cc: Wojciech Macek Subject: [PATCH] drm/mediatek: Add RENDER capability to DRM device Date: Tue, 2 Apr 2024 07:53:52 +0000 Message-ID: <20240402075352.3147747-1-wmacek@chromium.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240402_005408_463981_F2D330DA X-CRM114-Status: GOOD ( 11.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DRM device shall create /dev/dri/renderXXX entry to allow ChromeOS VMs to access the OpenGL rendering offload. Signed-off-by: Wojciech Macek --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 74832c213092..afa4d6391b08 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -585,7 +585,8 @@ static struct drm_gem_object *mtk_drm_gem_prime_import(struct drm_device *dev, } static const struct drm_driver mtk_drm_driver = { - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC, + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC | + DRIVER_RENDER, .dumb_create = mtk_drm_gem_dumb_create,