From patchwork Thu Apr 6 11:02:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 80207 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp950350vqo; Thu, 6 Apr 2023 04:32:40 -0700 (PDT) X-Google-Smtp-Source: AKy350bJzRTvKN31GGOcJXUT9Csonn8/bs7Fix2rt4xITTmpW05J0gOvWy3wQb+amB1THcY2mGx6 X-Received: by 2002:a17:906:2319:b0:92e:efa:b9b4 with SMTP id l25-20020a170906231900b0092e0efab9b4mr6841196eja.22.1680780760223; Thu, 06 Apr 2023 04:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680780760; cv=none; d=google.com; s=arc-20160816; b=RvY8i9+/lNvW/k7s2T5GiCqnptPH366cEEFsyW1Rl37QJEQjXXfdKufZR97QJid6ay +Ea5mBOTYpPIYKRJoK3for4/ud3WaI1TkGSyc1+MefCaIKvems/NfUMKnki5apJV0Q/C frytuppbvwfFXGdMKXGqrcIG8XK+NBN0to+8YSsZmtBFshjs82ZZ2AgS0CusZdrP4f0A ZTJo5VB1tgWb2BqFCOBl0NdGljugddwfaiTWmywrxJE25KoRsqEEjs7ZAgOymhdf7weT QNuLhJ6UYgHck6ZZZUQ6bdPDriivgJoCV8w5DJFxE2/s70nmcp6xr+3HyCgzQ2lzKCVP cQUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=F9cjdA8/GM7kIIzZALenJgnn3cYAeF/whaYu+OzAjvc=; b=UP0CbBDIIS1/7FjKeB3sAzweNtne3/mhC8J9LsWOaHstSaVb/eOIHmooOO6hIYIx10 2cwYMlgO4ecNnqo814ZE5My2k2dQGGwqGhlKEUBj3CME947nV0RAqBcUYTwvLKIxCoIN 5Letm0Q5y4066vs+v2jPHn3yaSACV6J89sNG9e7ZM6K5qDEiWgS6A+6UNFeWNWBTi5gQ Rg9SxLu3xP9PwSs70AmmA6y81MQWM5S2RyDk4IrEXlqlsEmB+hanIfI/1cfA8prvlQ3h TmVRLYKJ/IHy5JCNJ64LY+8avp11lsrEuDvfl9Rk+EvmhsBwLBud3WUl7T6Tm8e2fbhv CU7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=K1iCrkl2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a170906840800b0093229a6bc5dsi934615ejx.264.2023.04.06.04.32.16; Thu, 06 Apr 2023 04:32:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=K1iCrkl2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237004AbjDFLDo (ORCPT + 99 others); Thu, 6 Apr 2023 07:03:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236159AbjDFLDl (ORCPT ); Thu, 6 Apr 2023 07:03:41 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79F377EE4 for ; Thu, 6 Apr 2023 04:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680778974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F9cjdA8/GM7kIIzZALenJgnn3cYAeF/whaYu+OzAjvc=; b=K1iCrkl234kDhxu3E0FGC7rI9XjELtk6uLlo/WKAxvwJB8IoKP/BaHfJcqxb0+2+/zRBTE WaQp44FmH7i6k/3NHFT1OOQvwZT/3iK6D6/tXJNMCCeWbdKfgCzUBge86LXPSSz+LODDSO k4OSOSBEXNTGYbkaOvmwcWOTUgaPsmw= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-6u50CUASN52u7nT0RUQMJw-1; Thu, 06 Apr 2023 07:02:53 -0400 X-MC-Unique: 6u50CUASN52u7nT0RUQMJw-1 Received: by mail-wm1-f71.google.com with SMTP id r11-20020a05600c458b00b003eea8d25f06so18536636wmo.1 for ; Thu, 06 Apr 2023 04:02:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680778972; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F9cjdA8/GM7kIIzZALenJgnn3cYAeF/whaYu+OzAjvc=; b=yZAy4MvFr5Ww774oIHpcU94yB9T733O5pUydS9ZeldmWXst2F8Kq80AT6BRnlyRDrW lXaGZiatDXeE+qzXfnvEu22KyNnCV6uURo3GDyV11jD8DmcIb2EgSOLHGwWmB6pcuFom H9j5aHBAu7hB8Rp/qKndztbx67a+W4j/CA810o702QW1r8Ka44yvS5Xqs7Pt1ljz+lxf dA1plLg/D1XVc1xmLfxJOWYtwu0nCZSD5ooHbcRaDloMgn4h6VZQkOVnt/OdfyENC95U aALp69b6klWM528fwadAsMNnhB+R/8woYitRKVFYqLh0xtIX3Z2KDVWJtQtFREq+5AHC buyw== X-Gm-Message-State: AAQBX9fy0ZgZZ1mgP+DOiYQ3z5SkwxHoi6LnKMflClQWg7o+kkMI7YyL b4lkMrTKTLj5ljuKCg69smxQDVC0tZPa/DxK97wIAIsUIvL/yKLfCS67RKMXFRoX8zI+GDA9Lhi 4eKGpRIxkihjDLaeDgp1UyHtNsKKz4zrDTNtQ7AwE4/7lUPAKlAebYWT4eQlw3Ww2dMBoI1YKG0 CnQZM8KJY= X-Received: by 2002:adf:f28a:0:b0:2d2:f3e3:115d with SMTP id k10-20020adff28a000000b002d2f3e3115dmr6654969wro.59.1680778972392; Thu, 06 Apr 2023 04:02:52 -0700 (PDT) X-Received: by 2002:adf:f28a:0:b0:2d2:f3e3:115d with SMTP id k10-20020adff28a000000b002d2f3e3115dmr6654939wro.59.1680778971990; Thu, 06 Apr 2023 04:02:51 -0700 (PDT) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id b6-20020a05600010c600b002d8566128e5sm1472401wrx.25.2023.04.06.04.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 04:02:51 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Thomas Zimmermann , =?utf-8?q?Ma=C3=ADra_Canal?= , Marius Vlad , Javier Martinez Canillas , Daniel Vetter , David Airlie , Haneen Mohammed , Melissa Wen , Rodrigo Siqueira , dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/vkms: Drop vkms_connector_destroy() wrapper Date: Thu, 6 Apr 2023 13:02:34 +0200 Message-Id: <20230406110235.3092055-2-javierm@redhat.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406110235.3092055-1-javierm@redhat.com> References: <20230406110235.3092055-1-javierm@redhat.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762426366475296055?= X-GMAIL-MSGID: =?utf-8?q?1762426366475296055?= This helper is just a wrapper that calls drm_connector_cleanup(), there's no need to have another level of indirection. Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Vetter --- drivers/gpu/drm/vkms/vkms_output.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c index 991857125bb4..4de6f8ae38be 100644 --- a/drivers/gpu/drm/vkms/vkms_output.c +++ b/drivers/gpu/drm/vkms/vkms_output.c @@ -6,14 +6,9 @@ #include #include -static void vkms_connector_destroy(struct drm_connector *connector) -{ - drm_connector_cleanup(connector); -} - static const struct drm_connector_funcs vkms_connector_funcs = { .fill_modes = drm_helper_probe_single_connector_modes, - .destroy = vkms_connector_destroy, + .destroy = drm_connector_cleanup, .reset = drm_atomic_helper_connector_reset, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, From patchwork Thu Apr 6 11:02:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 80198 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp939594vqo; Thu, 6 Apr 2023 04:12:51 -0700 (PDT) X-Google-Smtp-Source: AKy350YX/XZGbQFEZGL3CeuYs6OwtlhDJH/tqTALtIRngTe8jOXzkFEmdyVPRqyVrEoeGse0Rkuj X-Received: by 2002:a17:906:578c:b0:948:d1af:3a5a with SMTP id k12-20020a170906578c00b00948d1af3a5amr6467108ejq.5.1680779571496; Thu, 06 Apr 2023 04:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680779571; cv=none; d=google.com; s=arc-20160816; b=JN4iD23DV3aGImuGD+A+KGov9/Cm/fPi4xuqcVTSm8w/N+nXiRTC0Uv9AkLfqTpCyi Oj91G63E5oaS5r22GZ043NroQiIgmUqccyfhXn8uSACOM0kPR+9mbBM7/G/PV9WKMDrU ObVQONqBn2vdnxxoICx1caWt3C48uzCkWNlEo/MfojjIZu+/+qaaNDpKoCjEML1O/vlC CXFwy55JFDjTDIGCsseBtjiDBkaYh28mzEvCHFmzIX+DXgb//TAbis4J+SuTctqEZsk3 GkUgZrlxfX2dv6BVx4nj5Cm6duAr106QtOLoQ3n6jQj1CEynCv4ltWbzm++iuDMBIzMr dvuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W9PADBV7kdrsYwkgT7yvWF1gcrM9r8sRUlyu8sOkzqE=; b=z31OXvj6z4Rh9qMrihYPsdyIHtMj389p9K1eIwyxEctLHxgIYNOJYZADGgoc+IoN9X fj6W7w50ypI+tSHVue0c/lwIVafb42nkq/BXLq40nqarSjynqhyk342YVh75kOLYvSLW 3P/9fhCTYMwbab7plf+flPnJ7FpAw6H9EFfILaaYAYX/PeRX1wpevUAV7k9sZZH5kOvG Kyp5JXKawrHJRK5ZTEr4zSZd3qdjdg+DF6qIkKhepKDtJCT6NL6vKB45d6nTTBPSAXpA 4d9ajjxb7ixWb9CWACL4RO6EPF8bw0YDirRO4/JOtrIwOWnFxjIi084nOqBiDAw78+Bh 5Fdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=K6T8Cxeu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kf20-20020a17090776d400b009268b9aa263si395962ejc.306.2023.04.06.04.12.27; Thu, 06 Apr 2023 04:12:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=K6T8Cxeu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236159AbjDFLDr (ORCPT + 99 others); Thu, 6 Apr 2023 07:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236684AbjDFLDn (ORCPT ); Thu, 6 Apr 2023 07:03:43 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 204E461BF for ; Thu, 6 Apr 2023 04:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680778977; 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=W9PADBV7kdrsYwkgT7yvWF1gcrM9r8sRUlyu8sOkzqE=; b=K6T8Cxeusk9tBwuid+TsZsopn1FouKLESD4Y5MiDQQUwYBzmy7ftY25IFwfoXF1noiS7j8 CTabkr8DP4kTnnwGnwCEPUt8XLAYtdjuokUPLUqkxj1NNqPssgTD8/mBeysACPCBhuzwEt efM29HRfNp1tmCukc+lbjIJX8SlUNAo= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-486-gZzYQ7NxOpCeYBN4MSf4iA-1; Thu, 06 Apr 2023 07:02:56 -0400 X-MC-Unique: gZzYQ7NxOpCeYBN4MSf4iA-1 Received: by mail-wr1-f72.google.com with SMTP id bn9-20020a056000060900b002cfe8493fe6so4785263wrb.4 for ; Thu, 06 Apr 2023 04:02:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680778973; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W9PADBV7kdrsYwkgT7yvWF1gcrM9r8sRUlyu8sOkzqE=; b=1hIHOQMOKOj37htjjEqfQzsWCCwqEWHxNMbHOFuu3aQem8MLP/eYFyJ4NwS4n/NgK2 E7ReYqLVHv5xxvfMFO6oUtep7kbTQ+bg/fNr8y/qLKvb1/qws0sE19c5MjT8mHBhmVOL P9zb/YmI7BYemP15qyZFY3nj4pP5eoF7YUcFcWePI6l6ytypyVfLemIzCTwzDJjgcp5h 017AqL8IqSxPkWH440ThRb8xQeh9eKeymOg8kQvCnF4KDoti3KjhUtYsm5aPR9H9VTL0 kGnV3G8CejMo6taJw2KJDsCr9HJ36ph86LZfU97q7udzsn+WoCpz2Bia0RDprej7NBcq sFFg== X-Gm-Message-State: AAQBX9elt8NyqM8F/0K8rQX88OlOVi7jPaD1N/0msRxqE0QCdh0FYzpq e6ssblAhSU3IAbs8p4mxPcT7j1CdrOtb5cZtqWJUizwtBwZNiKLsMoWJZocoKi2CD1SS8Iy/mS6 enrr7H9Uiq5lQ8LCq7j5WriDEpyGwk3bx5goNEPDYay6785TsUT0tA/v7Zxo9Yj8/FJ8Ktzt6Eq qWEj1G5Uo= X-Received: by 2002:adf:f44d:0:b0:2d2:3ca:8c43 with SMTP id f13-20020adff44d000000b002d203ca8c43mr7623967wrp.31.1680778973660; Thu, 06 Apr 2023 04:02:53 -0700 (PDT) X-Received: by 2002:adf:f44d:0:b0:2d2:3ca:8c43 with SMTP id f13-20020adff44d000000b002d203ca8c43mr7623929wrp.31.1680778973292; Thu, 06 Apr 2023 04:02:53 -0700 (PDT) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id b6-20020a05600010c600b002d8566128e5sm1472401wrx.25.2023.04.06.04.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 04:02:53 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Thomas Zimmermann , =?utf-8?q?Ma=C3=ADra_Canal?= , Marius Vlad , Javier Martinez Canillas , Daniel Vetter , David Airlie , Haneen Mohammed , Melissa Wen , Rodrigo Siqueira , dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/vkms: Remove include Date: Thu, 6 Apr 2023 13:02:35 +0200 Message-Id: <20230406110235.3092055-3-javierm@redhat.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406110235.3092055-1-javierm@redhat.com> References: <20230406110235.3092055-1-javierm@redhat.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762425120018580498?= X-GMAIL-MSGID: =?utf-8?q?1762425120018580498?= The driver doesn't use simple-KMS helpers to set a simple display pipeline but it only uses the drm_simple_encoder_init() helper from simple-KMS that initializes and encoder. That helper is just a wrapper of drm_encoder_init(), but passing a struct drm_encoder_funcs that sets the .destroy handler to drm_encoder_cleanup(). Since the header is only included for this helper and because the connector is initialized with drm_connector_init() as well, do the same for the encoder and drop the header include. Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/vkms/vkms_output.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c index 4de6f8ae38be..5ce70dd946aa 100644 --- a/drivers/gpu/drm/vkms/vkms_output.c +++ b/drivers/gpu/drm/vkms/vkms_output.c @@ -4,7 +4,6 @@ #include #include #include -#include static const struct drm_connector_funcs vkms_connector_funcs = { .fill_modes = drm_helper_probe_single_connector_modes, @@ -14,6 +13,10 @@ static const struct drm_connector_funcs vkms_connector_funcs = { .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; +static const struct drm_encoder_funcs vkms_encoder_funcs = { + .destroy = drm_encoder_cleanup, +}; + static int vkms_conn_get_modes(struct drm_connector *connector) { int count; @@ -86,7 +89,8 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index) drm_connector_helper_add(connector, &vkms_conn_helper_funcs); - ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL); + ret = drm_encoder_init(dev, encoder, &vkms_encoder_funcs, + DRM_MODE_ENCODER_VIRTUAL, NULL); if (ret) { DRM_ERROR("Failed to init encoder\n"); goto err_encoder;