From patchwork Tue Feb 11 16:22:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 11375877 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02980109A for ; Tue, 11 Feb 2020 16:22:15 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id DF18F20708 for ; Tue, 11 Feb 2020 16:22:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF18F20708 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F33596EEA7; Tue, 11 Feb 2020 16:22:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A0AD6EEA7; Tue, 11 Feb 2020 16:22:11 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2020 08:22:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,428,1574150400"; d="scan'208";a="266311544" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga002.fm.intel.com with SMTP; 11 Feb 2020 08:22:08 -0800 Received: by stinkbox (sSMTP sendmail emulation); Tue, 11 Feb 2020 18:22:08 +0200 From: Ville Syrjala To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 0/7] drm: Try to fix encoder possible_clones/crtc Date: Tue, 11 Feb 2020 18:22:01 +0200 Message-Id: <20200211162208.16224-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.24.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: intel-gfx@lists.freedesktop.org, Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Ville Syrjälä Another respin of the possible_clones/crtcs fixing. Changes based on v2 review: - introduce drm_mode_config_validate() - WARN for possible_clones!=0 when the encoder itself isn't in the mask - update the documentation to match the code Other changes: - sligth refactoring of the code to make it more consistent - add a patch to fixup possible_crtcs too (might not be needed but included it just in case). Cc: Thomas Zimmermann Cc: Daniel Vetter Ville Syrjälä (7): drm: Include the encoder itself in possible_clones drm/gma500: Sanitize possible_clones drm/exynos: Use drm_encoder_mask() drm/imx: Remove the bogus possible_clones setup drm: Validate encoder->possible_clones drm: Validate encoder->possible_crtcs drm: Allow drivers to leave encoder->possible_crtcs==0 drivers/gpu/drm/drm_crtc_internal.h | 1 + drivers/gpu/drm/drm_drv.c | 3 + drivers/gpu/drm/drm_mode_config.c | 97 +++++++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_drv.c | 5 +- drivers/gpu/drm/gma500/framebuffer.c | 16 ++-- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 4 +- drivers/gpu/drm/imx/imx-drm-core.c | 4 +- include/drm/drm_encoder.h | 12 ++- 8 files changed, 125 insertions(+), 17 deletions(-)