From patchwork Tue Jan 11 10:17:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 12709668 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 19097C433EF for ; Tue, 11 Jan 2022 10:09:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E6ACA10E4EA; Tue, 11 Jan 2022 10:09:41 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id D614A10E8E0; Tue, 11 Jan 2022 10:09:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641895779; x=1673431779; h=from:to:cc:subject:date:message-id; bh=B1v5+Xbxr/M4P2KisWbqFZ7DKFskAFeCcxwVt/UBdHk=; b=dz6QGXOx4TJRFWvvSJG7Jgg2Ndb1yIVq3QhRGHE3DtfE076wmtAzZUx6 iRfAc62Nn321BmV0Dhe02z0ts9frV6gxmSIa8Wz4Qbtmnjf1E85HxoLLM Br6RFGlc+AGxkM6/kC/F1evT4sBSRB0IPnZzrdT9DuNfQKxUK5LFq1o7h B+E4Kf40S37G7oYVUTH55Y6GEGHq+5b/aD22FlSfcuinEhChPDiPZAQGU bdZ7ZujWzDCfaMrJ63xFz4wmtR4FWwi/3Ean7wrE829eJgnUlITOMtZ5Q VwauZZoFQC0lzJ2DyxKJu+x7tqLtY7qvCVJnQUaMjr/ADOTzr3yxICK6H A==; X-IronPort-AV: E=McAfee;i="6200,9189,10223"; a="241003468" X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="241003468" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 02:09:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="762482668" Received: from srr4-3-linux-116-skandpal.iind.intel.com ([10.190.238.57]) by fmsmga006.fm.intel.com with ESMTP; 11 Jan 2022 02:09:36 -0800 From: "Kandpal, Suraj" To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Tue, 11 Jan 2022 15:47:59 +0530 Message-Id: <20220111101801.28310-1-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [Intel-gfx] [PATCH 1/3] drm: add writeback pointers to drm_connector X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com, arun.r.murthy@intel.com, Kandpal@freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Changing drm_connector and drm_encoder feilds to pointers in drm_writeback_connector as the elements of struct drm_writeback_connector are: struct drm_writeback_connector { struct drm_connector base; struct drm_encoder encoder; Similarly the elements of intel_encoder and intel_connector are: struct intel_encoder { struct drm_encoder base; struct intel_connector { struct drm_connector base; The function drm_writeback_connector_init() will initialize the drm_connector and drm_encoder and attach them as well. Since the drm_connector/encoder are both struct in drm_writeback_connector and intel_connector/encoder, we need one of them to be a pointer so we can reference them or else we will be pointing to 2 seprate instances. Usually the struct defined in drm framework pointing to any struct will be pointer and allocating them and initialization will be done with the users. Like struct drm_connector and drm_encoder are part of drm framework and the users of these such as i915 have included them in their struct intel_connector and intel_encoder. Likewise struct drm_writeback_connector is a special connector and hence is not a user of drm_connector and hence this should be pointers. Adding drm_writeback_connector to drm_connector so that writeback_connector can be fetched from drm_connector as the previous container_of method won't work due to change in the feilds of drm_connector and drm_encoder in drm_writeback_connector. Note:The corresponding ripple effect due to the above changes namely in two drivers as I can see it komeda and vkms have been dealt with in the upcoming patches of this series. Signed-off-by: Kandpal, Suraj Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/drm_writeback.c | 19 ++++++++++--------- include/drm/drm_connector.h | 3 +++ include/drm/drm_writeback.h | 6 +++--- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c index dccf4504f1bb..47238db42363 100644 --- a/drivers/gpu/drm/drm_writeback.c +++ b/drivers/gpu/drm/drm_writeback.c @@ -87,7 +87,7 @@ static const char *drm_writeback_fence_get_driver_name(struct dma_fence *fence) struct drm_writeback_connector *wb_connector = fence_to_wb_connector(fence); - return wb_connector->base.dev->driver->name; + return wb_connector->base->dev->driver->name; } static const char * @@ -177,7 +177,7 @@ int drm_writeback_connector_init(struct drm_device *dev, const u32 *formats, int n_formats) { struct drm_property_blob *blob; - struct drm_connector *connector = &wb_connector->base; + struct drm_connector *connector = wb_connector->base; struct drm_mode_config *config = &dev->mode_config; int ret = create_writeback_properties(dev); @@ -189,14 +189,15 @@ int drm_writeback_connector_init(struct drm_device *dev, if (IS_ERR(blob)) return PTR_ERR(blob); - drm_encoder_helper_add(&wb_connector->encoder, enc_helper_funcs); - ret = drm_encoder_init(dev, &wb_connector->encoder, + drm_encoder_helper_add(wb_connector->encoder, enc_helper_funcs); + ret = drm_encoder_init(dev, wb_connector->encoder, &drm_writeback_encoder_funcs, DRM_MODE_ENCODER_VIRTUAL, NULL); if (ret) goto fail; connector->interlace_allowed = 0; + connector->wb_connector = wb_connector; ret = drm_connector_init(dev, connector, con_funcs, DRM_MODE_CONNECTOR_WRITEBACK); @@ -204,7 +205,7 @@ int drm_writeback_connector_init(struct drm_device *dev, goto connector_fail; ret = drm_connector_attach_encoder(connector, - &wb_connector->encoder); + wb_connector->encoder); if (ret) goto attach_fail; @@ -233,7 +234,7 @@ int drm_writeback_connector_init(struct drm_device *dev, attach_fail: drm_connector_cleanup(connector); connector_fail: - drm_encoder_cleanup(&wb_connector->encoder); + drm_encoder_cleanup(wb_connector->encoder); fail: drm_property_blob_put(blob); return ret; @@ -263,7 +264,7 @@ int drm_writeback_prepare_job(struct drm_writeback_job *job) { struct drm_writeback_connector *connector = job->connector; const struct drm_connector_helper_funcs *funcs = - connector->base.helper_private; + connector->base->helper_private; int ret; if (funcs->prepare_writeback_job) { @@ -315,7 +316,7 @@ void drm_writeback_cleanup_job(struct drm_writeback_job *job) { struct drm_writeback_connector *connector = job->connector; const struct drm_connector_helper_funcs *funcs = - connector->base.helper_private; + connector->base->helper_private; if (job->prepared && funcs->cleanup_writeback_job) funcs->cleanup_writeback_job(connector, job); @@ -401,7 +402,7 @@ drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector) { struct dma_fence *fence; - if (WARN_ON(wb_connector->base.connector_type != + if (WARN_ON(wb_connector->base->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)) return NULL; diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index b501d0badaea..ec4657cfd7b9 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -44,6 +44,7 @@ struct drm_printer; struct drm_privacy_screen; struct edid; struct i2c_adapter; +struct drm_writeback_connector; enum drm_connector_force { DRM_FORCE_UNSPECIFIED, @@ -1533,6 +1534,8 @@ struct drm_connector { */ struct drm_encoder *encoder; + struct drm_writeback_connector *wb_connector; + #define MAX_ELD_BYTES 128 /** @eld: EDID-like data, if present */ uint8_t eld[MAX_ELD_BYTES]; diff --git a/include/drm/drm_writeback.h b/include/drm/drm_writeback.h index 9697d2714d2a..078c9907219c 100644 --- a/include/drm/drm_writeback.h +++ b/include/drm/drm_writeback.h @@ -22,7 +22,7 @@ struct drm_writeback_connector { /** * @base: base drm_connector object */ - struct drm_connector base; + struct drm_connector *base; /** * @encoder: Internal encoder used by the connector to fulfill @@ -31,7 +31,7 @@ struct drm_writeback_connector { * by passing the @enc_funcs parameter to drm_writeback_connector_init() * function. */ - struct drm_encoder encoder; + struct drm_encoder *encoder; /** * @pixel_formats_blob_ptr: @@ -143,7 +143,7 @@ struct drm_writeback_job { static inline struct drm_writeback_connector * drm_connector_to_writeback(struct drm_connector *connector) { - return container_of(connector, struct drm_writeback_connector, base); + return connector->wb_connector; } int drm_writeback_connector_init(struct drm_device *dev, From patchwork Tue Jan 11 10:18:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 12709669 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 92D2FC433EF for ; Tue, 11 Jan 2022 10:10:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 50E3210E90E; Tue, 11 Jan 2022 10:09:56 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id A133910E8A0; Tue, 11 Jan 2022 10:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641895794; x=1673431794; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=hNanYDvEujPhHa3DRNWCLQva2fSMfaX3lt33sEeZZJg=; b=nyF5hVf2Qe9jlStk7iinYCrNWxYS7cEuXBAzWf+ZJTD0KI8EMw0oQldI uFApZT0TsATPVmCN16o5RuRU3bip4DV+WoqidiGrcKpMbT3adhh2H9qo3 z2k0+PlGqUIaQpElrXnNr0nWY1fZAq6OQnFM+MdCtf4zRHggzEzti7MVt d9p7MZclEV6HjZ3fVi5WRy4e27zwu9E774K54cS0c7Lf4aasoupMjBtuK AhvToNYNKeeOkOphm+kkKklGJ9bncz3MyYZSVDurBK3xrOaJfPhvkzFwx 9P8CQNrijmKRZGHU7ZawmW58CPbDxmyJsxHFTkq0fu57QIFysdmgXkISp w==; X-IronPort-AV: E=McAfee;i="6200,9189,10223"; a="230792385" X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="230792385" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 02:09:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="762482691" Received: from srr4-3-linux-116-skandpal.iind.intel.com ([10.190.238.57]) by fmsmga006.fm.intel.com with ESMTP; 11 Jan 2022 02:09:44 -0800 From: "Kandpal, Suraj" To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Tue, 11 Jan 2022 15:48:00 +0530 Message-Id: <20220111101801.28310-2-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220111101801.28310-1-suraj.kandpal@intel.com> References: <20220111101801.28310-1-suraj.kandpal@intel.com> Subject: [Intel-gfx] [PATCH 2/3] drm/arm/komeda : change driver to use drm_writeback_connector.base pointer X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com, arun.r.murthy@intel.com, Kandpal@freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Making changes to komeda driver because we had to change drm_writeback_connector.base into a pointer the reason for which is expained in the Patch (drm: add writeback pointers to drm_connector). Signed-off-by: Kandpal, Suraj Reviewed-by: Carsten Haitzler --- drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 2 +- drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 3 ++- drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 9 +++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c index 59172acb9738..eb37f41c1790 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c @@ -265,7 +265,7 @@ komeda_crtc_do_flush(struct drm_crtc *crtc, if (slave && has_bit(slave->id, kcrtc_st->affected_pipes)) komeda_pipeline_update(slave, old->state); - conn_st = wb_conn ? wb_conn->base.base.state : NULL; + conn_st = wb_conn ? wb_conn->base.base->state : NULL; if (conn_st && conn_st->writeback_job) drm_writeback_queue_job(&wb_conn->base, conn_st); diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h index 456f3c435719..8d83883a1d99 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h @@ -53,6 +53,7 @@ struct komeda_plane_state { * struct komeda_wb_connector */ struct komeda_wb_connector { + struct drm_connector conn; /** @base: &drm_writeback_connector */ struct drm_writeback_connector base; @@ -136,7 +137,7 @@ struct komeda_kms_dev { static inline bool is_writeback_only(struct drm_crtc_state *st) { struct komeda_wb_connector *wb_conn = to_kcrtc(st->crtc)->wb_conn; - struct drm_connector *conn = wb_conn ? &wb_conn->base.base : NULL; + struct drm_connector *conn = wb_conn ? wb_conn->base.base : NULL; return conn && (st->connector_mask == BIT(drm_connector_index(conn))); } diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c index e465cc4879c9..0caaf483276d 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c @@ -51,7 +51,7 @@ komeda_wb_encoder_atomic_check(struct drm_encoder *encoder, return -EINVAL; } - wb_layer = to_kconn(to_wb_conn(conn_st->connector))->wb_layer; + wb_layer = to_kconn(drm_connector_to_writeback(conn_st->connector))->wb_layer; /* * No need for a full modested when the only connector changed is the @@ -123,7 +123,7 @@ komeda_wb_connector_fill_modes(struct drm_connector *connector, static void komeda_wb_connector_destroy(struct drm_connector *connector) { drm_connector_cleanup(connector); - kfree(to_kconn(to_wb_conn(connector))); + kfree(to_kconn(drm_connector_to_writeback(connector))); } static const struct drm_connector_funcs komeda_wb_connector_funcs = { @@ -155,6 +155,7 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms, kwb_conn->wb_layer = kcrtc->master->wb_layer; wb_conn = &kwb_conn->base; + wb_conn->base = &kwb_conn->conn; wb_conn->encoder.possible_crtcs = BIT(drm_crtc_index(&kcrtc->base)); formats = komeda_get_layer_fourcc_list(&mdev->fmt_tbl, @@ -171,9 +172,9 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms, return err; } - drm_connector_helper_add(&wb_conn->base, &komeda_wb_conn_helper_funcs); + drm_connector_helper_add(wb_conn->base, &komeda_wb_conn_helper_funcs); - info = &kwb_conn->base.base.display_info; + info = &kwb_conn->base.base->display_info; info->bpc = __fls(kcrtc->master->improc->supported_color_depths); info->color_formats = kcrtc->master->improc->supported_color_formats; From patchwork Tue Jan 11 10:18:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 12709670 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 86332C4332F for ; Tue, 11 Jan 2022 10:10:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CC0C10F5C9; Tue, 11 Jan 2022 10:09:56 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2AEA10E8A2; Tue, 11 Jan 2022 10:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641895795; x=1673431795; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=gLpEFzjhbh1j/IyS3srgDmraBo4qO+gRp/VDEsiOSLI=; b=Lu4898CweRP8snY9AG2SaGuOz88F0+PbJtTKjHSSab4JyRw5KkCi0suo Ma5jVy7fIFIoUBKWk2mNoOOv6GGqxiibnb34PHgUCyVQ/JAEmeomVH15C vxvXgcK1QaO9Oj8quA6LbnOickck1kvWrGMSfbZXkQzA1Cff8vA0A5bGQ 0iFcgxda6Anw2SgonBY0IHSk8OOrejDWjSIIPw96XP9gM8OC9fhDiFGtz A0bR4mCDoayHLJLJpjCK/IH1D4Emk2qSFfzxltPFnpxrlhNZHr7tXQMbE UEcReqC7hMfGsp7cIydDldB0bTQaNGzx34Qqkw+HjSTDDfjeS+ZDt29Kn g==; X-IronPort-AV: E=McAfee;i="6200,9189,10223"; a="230792395" X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="230792395" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 02:09:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="762482702" Received: from srr4-3-linux-116-skandpal.iind.intel.com ([10.190.238.57]) by fmsmga006.fm.intel.com with ESMTP; 11 Jan 2022 02:09:48 -0800 From: "Kandpal, Suraj" To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Tue, 11 Jan 2022 15:48:01 +0530 Message-Id: <20220111101801.28310-3-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220111101801.28310-1-suraj.kandpal@intel.com> References: <20220111101801.28310-1-suraj.kandpal@intel.com> Subject: [Intel-gfx] [PATCH 3/3] drm/vkms: change vkms driver to use drm_writeback_connector.base pointer X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com, arun.r.murthy@intel.com, Kandpal@freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Changing vkms driver to accomadate the change of drm_writeback_connector.base to a pointer the reason for which is explained in the Patch(drm: add writeback pointers to drm_connector). Signed-off-by: Kandpal, Suraj --- drivers/gpu/drm/vkms/vkms_writeback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c b/drivers/gpu/drm/vkms/vkms_writeback.c index 8694227f555f..6de0c4213425 100644 --- a/drivers/gpu/drm/vkms/vkms_writeback.c +++ b/drivers/gpu/drm/vkms/vkms_writeback.c @@ -114,7 +114,7 @@ static void vkms_wb_atomic_commit(struct drm_connector *conn, struct vkms_device *vkmsdev = drm_device_to_vkms_device(conn->dev); struct vkms_output *output = &vkmsdev->output; struct drm_writeback_connector *wb_conn = &output->wb_connector; - struct drm_connector_state *conn_state = wb_conn->base.state; + struct drm_connector_state *conn_state = wb_conn->base->state; struct vkms_crtc_state *crtc_state = output->composer_state; if (!conn_state) @@ -140,8 +140,8 @@ int vkms_enable_writeback_connector(struct vkms_device *vkmsdev) { struct drm_writeback_connector *wb = &vkmsdev->output.wb_connector; - vkmsdev->output.wb_connector.encoder.possible_crtcs = 1; - drm_connector_helper_add(&wb->base, &vkms_wb_conn_helper_funcs); + vkmsdev->output.wb_connector.encoder->possible_crtcs = 1; + drm_connector_helper_add(wb->base, &vkms_wb_conn_helper_funcs); return drm_writeback_connector_init(&vkmsdev->drm, wb, &vkms_wb_connector_funcs,