From patchwork Thu Jun 28 18:29:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10494709 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FD7E60532 for ; Thu, 28 Jun 2018 18:29:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 651A02A762 for ; Thu, 28 Jun 2018 18:29:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5979E2A780; Thu, 28 Jun 2018 18:29:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E9B92A77C for ; Thu, 28 Jun 2018 18:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967790AbeF1S3V (ORCPT ); Thu, 28 Jun 2018 14:29:21 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:38953 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030483AbeF1S3S (ORCPT ); Thu, 28 Jun 2018 14:29:18 -0400 Received: by mail-yb0-f195.google.com with SMTP id k127-v6so2379935ybk.6 for ; Thu, 28 Jun 2018 11:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HQhrLjaGL6A7F1UIeWrJzojsbKIps+GXUtWPRxwClRQ=; b=Uw9MjZqMPmXLv2OHhHJFS5cG57tEEz2r6ir5N8FIWctnWc5uVNawSGzLEff0os5UfF r5Fae8QzujrG0PQculH53ycNxPdyia/YXr7uFeicNaJK2nP6tU3zfNsEoDNgEHO3m24/ Sa9tzvxAqqfNR1g4meP8z59795gs+GzSSU5E8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HQhrLjaGL6A7F1UIeWrJzojsbKIps+GXUtWPRxwClRQ=; b=XOp3737I+ldtk0yKfr6PvDlBMiYIAns+q93BeHEnEpb+uQRTAcP2xcmghmloe+pClv ixLJDpfzMKOSgm6etcwqg/fuaAyuPOsVJFBw6r6PdhSYC6+IokWGsfVu83+zUYr2qAiB T3/xsr97b4gHVeO2OrNcNXu9X1qVVMacqPwlMHdnHNeVc+hcqFneF95JptsCb/XfD2th 6cv6+YDpa5zYgA/bpVB+RWnk4oO+VpmpzgFx8+BgredrHm/02lW4IfRAJtMdJGJ0qQu8 1VnkwWYCzplv3hwkosQ4um9v8uTnY6ZSZNCCDxX1VRB9/XmqsSG9SaD1Yvq4p7yID+62 kDEQ== X-Gm-Message-State: APt69E0bJ9mGp1VzTXsBh/lHkYNCeCG2UtuGrxAt63mOh6pd4+PHD1JJ SkOTbdhY5jpG08H2KCMVV8biYw== X-Google-Smtp-Source: ADUXVKInSWuNvIT6Wc3bXLqHkC6GmxKFz8EM1scU5oEWxtfm5b0SVWQLGdRbV9UlLHUieuZbkijRDg== X-Received: by 2002:a25:8b8f:: with SMTP id j15-v6mr5698247ybl.174.1530210558071; Thu, 28 Jun 2018 11:29:18 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id g145-v6sm2732140ywe.17.2018.06.28.11.29.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 11:29:17 -0700 (PDT) From: Sean Paul To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: robdclark@gmail.com, hoegsberg@chromium.org, jsanka@codeaurora.org, abhinavk@codeaurora.org, Sean Paul Subject: [DPU PATCH 11/15] drm/msm: Remove dpu module parameters Date: Thu, 28 Jun 2018 14:29:02 -0400 Message-Id: <20180628182906.84926-12-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.rc2.346.g013aa6912e-goog In-Reply-To: <20180628182906.84926-1-seanpaul@chromium.org> References: <20180628182906.84926-1-seanpaul@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We don't use dpucustom, and the suspend blanking should be done by userspace instead of in kernel. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 51 ----------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 7 ---- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 12 ------ 3 files changed, 70 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index ddba0873466b..edb5d40f9160 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -55,27 +55,8 @@ static const char * const iommu_ports[] = { #define DPU_DEBUGFS_DIR "msm_dpu" #define DPU_DEBUGFS_HWMASKNAME "hw_log_mask" -/** - * dpucustom - enable certain driver customizations for dpu clients - * Enabling this modifies the standard DRM behavior slightly and assumes - * that the clients have specific knowledge about the modifications that - * are involved, so don't enable this unless you know what you're doing. - * - * Parts of the driver that are affected by this setting may be located by - * searching for invocations of the 'dpu_is_custom_client()' function. - * - * This is disabled by default. - */ -static bool dpucustom; -module_param(dpucustom, bool, 0400); -MODULE_PARM_DESC(dpucustom, "Enable customizations for dpu clients"); - static int dpu_kms_hw_init(struct msm_kms *kms); static int _dpu_kms_mmu_destroy(struct dpu_kms *dpu_kms); -bool dpu_is_custom_client(void) -{ - return dpucustom; -} static unsigned long dpu_iomap_size(struct platform_device *pdev, const char *name) @@ -606,10 +587,6 @@ static int _dpu_kms_drm_obj_init(struct dpu_kms *dpu_kms) int primary_planes_idx = 0, i, ret; int max_crtc_count; - u32 sspp_id[MAX_PLANES]; - u32 master_plane_id[MAX_PLANES]; - u32 num_virt_planes = 0; - if (!dpu_kms || !dpu_kms->dev || !dpu_kms->dev->dev) { DPU_ERROR("invalid dpu_kms\n"); return -EINVAL; @@ -646,27 +623,6 @@ static int _dpu_kms_drm_obj_init(struct dpu_kms *dpu_kms) if (primary) primary_planes[primary_planes_idx++] = plane; - - if (dpu_hw_sspp_multirect_enabled(&catalog->sspp[i]) && - dpu_is_custom_client()) { - int priority = - catalog->sspp[i].sblk->smart_dma_priority; - sspp_id[priority - 1] = catalog->sspp[i].id; - master_plane_id[priority - 1] = plane->base.id; - num_virt_planes++; - } - } - - /* Initialize smart DMA virtual planes */ - for (i = 0; i < num_virt_planes; i++) { - plane = dpu_plane_init(dev, sspp_id[i], false, - (1UL << max_crtc_count) - 1, master_plane_id[i]); - if (IS_ERR(plane)) { - DPU_ERROR("dpu_plane for virtual SSPP init failed\n"); - ret = PTR_ERR(plane); - goto fail; - } - priv->planes[priv->num_planes++] = plane; } max_crtc_count = min(max_crtc_count, primary_planes_idx); @@ -681,13 +637,6 @@ static int _dpu_kms_drm_obj_init(struct dpu_kms *dpu_kms) priv->crtcs[priv->num_crtcs++] = crtc; } - if (dpu_is_custom_client()) { - /* All CRTCs are compatible with all planes */ - for (i = 0; i < priv->num_planes; i++) - priv->planes[i]->possible_crtcs = - (1 << priv->num_crtcs) - 1; - } - /* All CRTCs are compatible with all encoders */ for (i = 0; i < priv->num_encoders; i++) priv->encoders[i]->possible_crtcs = (1 << priv->num_crtcs) - 1; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index 6308bd84e6a9..3437598ceef1 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h @@ -163,13 +163,6 @@ struct vsync_info { #define to_dpu_kms(x) container_of(x, struct dpu_kms, base) -/** - * dpu_is_custom_client - whether or not to enable non-standard customizations - * - * Return: Whether or not the 'dpuclient' module parameter was set on boot up - */ -bool dpu_is_custom_client(void); - /** * dpu_kms_is_suspend_state - whether or not the system is pm suspended * @dev: Pointer to drm device diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index c2088a3bfba7..ae05d4d002a9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -31,14 +31,6 @@ #include "dpu_vbif.h" #include "dpu_plane.h" -static bool suspend_blank = true; -module_param(suspend_blank, bool, 0400); -MODULE_PARM_DESC(suspend_blank, - "If set, active planes will force their outputs to black,\n" - "by temporarily enabling the color fill, when recovering\n" - "from a system resume instead of attempting to display the\n" - "last provided frame buffer."); - #define DPU_DEBUG_PLANE(pl, fmt, ...) DPU_DEBUG("plane%d " fmt,\ (pl) ? (pl)->base.base.id : -1, ##__VA_ARGS__) @@ -1245,10 +1237,6 @@ void dpu_plane_flush(struct drm_plane *plane) else if (pdpu->pipe_hw && pdpu->csc_ptr && pdpu->pipe_hw->ops.setup_csc) pdpu->pipe_hw->ops.setup_csc(pdpu->pipe_hw, pdpu->csc_ptr); - /* force black color fill during suspend */ - if (dpu_kms_is_suspend_state(plane->dev) && suspend_blank) - _dpu_plane_color_fill(pdpu, 0x0, 0x0); - /* flag h/w flush complete */ if (plane->state) pstate->pending = false;