From patchwork Thu Jun 9 07:27:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12874941 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 ACE33C433EF for ; Thu, 9 Jun 2022 07:32:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b/tsqnWM6rqMrjEXlAoojytvKrJAyT7DdpsbhVpr7uA=; b=3Qq87ZT8Cttu0M KouCAqX0jxVbT1PxAb0BucYkI7u4hyvbS97u3Ma1rXzAt0426fwcsm3sXvt/dDHJYsX2QX39DKTw5 9/oP6kzc6CXLbznXErRrhp8T03Rxyo3UXPzvp0gVgSY+AwcNv4Ptq/6F/PBTpANETERBYFUPd/16H R0/CfvYWCuA8wywa6TtJ1gYbwgKHNHxkIz01Z7PGrc8GD04g9xeCDlzDFAWNhT3LvDyU3mD7amGn2 /dfFmEu29QKW0HjE3fgUmKWKHHUdls6N3tPDoNLzkEGmWtbxB2bQ3DzQR311iEMappMa3k1bNXeQv Fe+1URH5pVXSsz3PWyvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCdD-00HQG3-7U; Thu, 09 Jun 2022 07:31:03 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCaL-00HOi2-AS for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 07:28:08 +0000 Received: by mail-pf1-x42a.google.com with SMTP id u2so20376231pfc.2 for ; Thu, 09 Jun 2022 00:28:02 -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 :mime-version:content-transfer-encoding; bh=G916ndi6znAFvnEdjgirXsQTXINNxUlsFrUsl3kkHpM=; b=Ab/Ic+N3PYzvVY9rC4wLHn0KuEQnNGOKYgz5k7NDX1sDl+NPwdPDWR2BTqZJmMuyl7 pJCNL0LMj1LMqRy0fVBiGW/q7oiDb1RPX14nYbfqbrOyJwmIWOPP49WI3ESH+OQb3CwZ BdcdiPGm/oVRjmwfOeH/hiY03hlkzKvGPKMWo= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=G916ndi6znAFvnEdjgirXsQTXINNxUlsFrUsl3kkHpM=; b=qi3ZQ/20KlvJH5YN3J7YXmHpKA8jUQhO92QDofQEuAICXGUMEE94+0zPbPhx2ig83A VhZTidnVR5qSuYPAAyYIDPVQP9nrg7M7/7PCd6HpShb6uoK/R7PcLgbNf4sqDI8x0z5L 0RGq18Ylsc11AysauhHx9GEoQIdIf3IRGMiio9iwK3lMkqY9TMMsHBnscGj+dvBDYboc IsvDY5PFM3Oyr0ZULXIDHatEk+4hKq2u7V6NrIS5zQhenpYulP6JkEmAvwO+O+kZIDNl nSW1G9Kvi7d1EbubAI8yCzDWZEp8KjOqYSzsDk4HbWASKLTgzuqI6+YtH5zuPm2U160f ZUhQ== X-Gm-Message-State: AOAM533XU15NjrtY7tMxZpkX8I2inusbwHzYcc0nOW16rBa3fztAMYuz evQ0N+WX5xZGA7CyNxz61bttkA== X-Google-Smtp-Source: ABdhPJye6fPlx4aQdZZkt+w0q0qfXmG0AQ+D0AlqoMudVOh6zefu4Y7cFZKkoiaVOrEQnuzP7CFd/g== X-Received: by 2002:a63:2cd7:0:b0:3fe:1c0a:75ce with SMTP id s206-20020a632cd7000000b003fe1c0a75cemr9121819pgs.602.1654759681962; Thu, 09 Jun 2022 00:28:01 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:5119:d95b:c6cd:77fb]) by smtp.gmail.com with ESMTPSA id p16-20020a1709027ed000b0016403cae7desm15312221plb.276.2022.06.09.00.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 00:28:01 -0700 (PDT) From: Hsin-Yi Wang To: Hans de Goede , Sam Ravnborg , Stephen Boyd , Douglas Anderson Cc: Thierry Reding , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Rob Clark , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 7/8] drm/panel: elida-kd35t133: Implement .get_orientation callback Date: Thu, 9 Jun 2022 15:27:21 +0800 Message-Id: <20220609072722.3488207-8-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220609072722.3488207-1-hsinyi@chromium.org> References: <20220609072722.3488207-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_002805_415125_9FE5F9E8 X-CRM114-Status: GOOD ( 11.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd --- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index 80227617a4d6e..fa613d1d7a8ff 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -217,15 +217,27 @@ static int kd35t133_get_modes(struct drm_panel *panel, connector->display_info.width_mm = mode->width_mm; connector->display_info.height_mm = mode->height_mm; drm_mode_probed_add(connector, mode); + /* + * TODO: Remove once all drm drivers call + * drm_connector_set_orientation_from_panel() + */ drm_connector_set_panel_orientation(connector, ctx->orientation); return 1; } +static enum drm_panel_orientation kd35t133_get_orientation(struct drm_panel *panel) +{ + struct kd35t133 *ctx = panel_to_kd35t133(panel); + + return ctx->orientation; +} + static const struct drm_panel_funcs kd35t133_funcs = { .unprepare = kd35t133_unprepare, .prepare = kd35t133_prepare, .get_modes = kd35t133_get_modes, + .get_orientation = kd35t133_get_orientation, }; static int kd35t133_probe(struct mipi_dsi_device *dsi)