From patchwork Wed Apr 6 10:12:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 12803089 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 71BFAC433F5 for ; Wed, 6 Apr 2022 10:13:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B2B3410E384; Wed, 6 Apr 2022 10:12:52 +0000 (UTC) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC01810E354 for ; Wed, 6 Apr 2022 10:12:50 +0000 (UTC) Received: by mail-lf1-x12c.google.com with SMTP id p15so3212394lfk.8 for ; Wed, 06 Apr 2022 03:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WNQASTvlLKNLD8hR/6/xkEqB3XhYihaOxq6BEyH/MZ0=; b=atuQiS5mxF0A6lAnssEBE+S1ASxnrBGHcRwSnMFpHRoBjSDhVfRkxwwRzVahRjk6Kd CYfKax7GiZwt/dT34ce2PxX97U9vax8orJomtkNh08SW0wwrRG9LNBHSPcKvp90QE/Nu OA7CNTWDuS/A1FhFLqkjMNGp0zo1iNOvsIjISChvcphencilmMlHA27gioK6FaMYevRk yxaHouk9KZE9tq3cIqnCJAKdIPmxzOlefnfXq7Poxyu06lnvbaTb78z3qv/JUR7v439w O+LEn93cnx88bt4nUAkM73TEzkOmEBf38fFE3WGvi/XRZzhw3QHaJ1WY/qy94YChmR2O 9sew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WNQASTvlLKNLD8hR/6/xkEqB3XhYihaOxq6BEyH/MZ0=; b=sk07Lc6UhMfVTpn3hnQB1jI3qYw9xHVhD3eAqZ/61YA9f7qUpGDokKDNyagCYAyRiI 6tFNXDD1KBfkTUHH3GTqi01Ya7zqIPIEaRODFAARZxKIWrycog+C+fU06GbP8N9OMLXL ewe4K/wqJF9geGgxwqSi6XQffxczIvSRU2OkFdH7/NIDMKlKLppSXkLQ3+qwittdEUrZ NyEyc3C195nNQ1VBaLdomH+tWpgJqXHz34+IZNYi/Pcv0jz+VtlM4bXgeUDt/er1JLK5 U7qFow9zarSSxmkJfJpfjxBWK4af8cVgPBU9pSiZexkkpum3eyhRwzDeXVqxoQlJskUP ay8g== X-Gm-Message-State: AOAM531Ai5JCldAgwrmnn7JpYGAc1U1ZUBGrk22jOTkUk6mDDjTqddII /7QCTHIB6MIBzNup2OpCBHGNbw== X-Google-Smtp-Source: ABdhPJzX2vCNyl1ZY1jdgUYMJAG16UJYPGAkYgC0AA1daRXryqUe34e942NN/QJZfTZ+Xv4ynJbxhg== X-Received: by 2002:a05:6512:10c3:b0:45c:d26a:d5e with SMTP id k3-20020a05651210c300b0045cd26a0d5emr5470082lfg.296.1649239969045; Wed, 06 Apr 2022 03:12:49 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id i4-20020a056512340400b0044a310f72f6sm1782154lfr.250.2022.04.06.03.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 03:12:48 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 0/3] drm/msm: remove DRM mode setting object arrays Date: Wed, 6 Apr 2022 13:12:44 +0300 Message-Id: <20220406101247.483649-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" MSM DRM driver stores connectors, encoders and planes in the arrays inside struct msm_drm_private. They are not really necessary, as drm_devices also references lists of these objects. Drop private arrays and use drm_mode_foo() macros. Note, the crtc array is kept intact as it is used in vblank handling code. Maybe it can be dropped later, but it would be a separate intrusive change. Changes since v1: - Also drop MAX_PLANES/MAX_ENCODERS/MAX_CONNECTORS defines (as suggested by Stephen) Dmitry Baryshkov (3): drm/msm/dpu: remove manual destruction of DRM objects drm/msm: loop over encoders using drm_for_each_encoder() drm/msm: don't store created planes, connectors and encoders drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 51 ++++++------------------ drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 7 ---- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 17 ++++---- drivers/gpu/drm/msm/dp/dp_display.c | 2 - drivers/gpu/drm/msm/dsi/dsi.c | 1 - drivers/gpu/drm/msm/hdmi/hdmi.c | 1 - drivers/gpu/drm/msm/msm_drv.h | 12 ------ 7 files changed, 21 insertions(+), 70 deletions(-)