From patchwork Tue Jun 7 09:05:48 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: 12871607 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 F17B9C433EF for ; Tue, 7 Jun 2022 09:18:13 +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=57/4ZnDOk/2NeJN5GXPGmPwer0ii5yI/M+KmvMEkxDU=; b=nMC20Ijdzrrmi7 Ns1Fxu3eF2O17wF7eHHzlpy8rfhN0S/QNpr5NQzdACynIIPyuVdCPX3+8KJT1UpK0G8Om4oEWxKGT OOAjlMH6NRwEn/ae2xAkms455ikETW3UXLlyfqmt0Q18TnT7uqoj+xnE0A6ZwnuxWkuzQ4z2VKSlp LwDU2+537wnXE/pyD23O9fjkt+fnRYnOOUic23MECkpkACtAFZuogwF+EnzQal/brEISzttHfFimY c2wf4IVM8zmvL29avdz4Vn8cZwl3n+bP7lm9fenlCgtinXStC9s83xBgPmpsZ18RxLYLNkjlcPzoZ 1ahd4V75NjLn+j/n9K6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyVKN-0068PH-Bb; Tue, 07 Jun 2022 09:16:44 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyVAN-0063ML-V0 for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2022 09:06:26 +0000 Received: by mail-pf1-x434.google.com with SMTP id c196so15005514pfb.1 for ; Tue, 07 Jun 2022 02:06:20 -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=k48F1xGdZKHAitodolvWiz5jWt34V6z7uuaNSWQHz/4=; b=oSqdlpz/+1EVr71yB5JJSZiahSwMJDpQSfi0wg1oZhrGuVUcVGy+jjbo99bnZ670g4 YuHEr+1VVs1fkdFx3qoAXUrtK4owpH0jzwPZtKVMjcUqYFTRSKP1dszaqK07o7LDBheh UmjUb4CHeVsjZ4zgrxSOiVJT9dGJ/kSflLBM0= 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=k48F1xGdZKHAitodolvWiz5jWt34V6z7uuaNSWQHz/4=; b=Rs9+durPwMkCloUn9fIAN9hPTI2OqmfnAz4IYvUHE/Be6Q+8TM1vp4ZbnCSY/16nuA ZKahMc7Um5beeEED62GIiAw72ee0rP/TduS9OAaVAcUnf1iRn2uGuiTesiMgHHpwzVBR gnyMbKoKw7QHZ8N8o6QOV8YyyWexfnRhXie4wYKlHpP/6ofGgdEFfj0DiSlg5wB30+9o P1A7udp4xTJzIsFr45m5ve1vXTHxkkfaw9cv032fhGougOHBUEH2YDSiR2D3uJG34g06 p/NXn75dMqRXJEl8D/Y0NoAEvDYI0tSZHNACjSQJWUt6q0BfPCdU25T+IxWqETXcjqlz /Itw== X-Gm-Message-State: AOAM5302W4o1Cj/wsrOyM8iJ55Zkzs6D941Ezcasf/g3U3IgKKEkxOeE jQpS+/2i9QfxQDpoCsLdigrsmQ== X-Google-Smtp-Source: ABdhPJx4/R3wgiPjf10Tc6Ix6ehs1YFuhLKxv4LZf8DhLrSrjuaQEmxY4+09E9Xrn4CO2l/wwZLFbQ== X-Received: by 2002:a62:ce4f:0:b0:51b:ac5c:4e49 with SMTP id y76-20020a62ce4f000000b0051bac5c4e49mr28557254pfg.81.1654592780106; Tue, 07 Jun 2022 02:06:20 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:40b7:55ce:10ee:c7a0]) by smtp.gmail.com with ESMTPSA id t27-20020aa7947b000000b0051c0fe8fb8csm4507010pfq.95.2022.06.07.02.06.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 02:06:19 -0700 (PDT) From: Hsin-Yi Wang To: Chun-Kuang Hu Cc: Hans de Goede , Thierry Reding , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Rob Clark , Stephen Boyd , Douglas Anderson , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 7/8] drm/panel: elida-kd35t133: Implement .get_orientation callback Date: Tue, 7 Jun 2022 17:05:48 +0800 Message-Id: <20220607090549.2345795-8-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220607090549.2345795-1-hsinyi@chromium.org> References: <20220607090549.2345795-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_020624_065436_9DF92CCA X-CRM114-Status: GOOD ( 13.06 ) 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 --- 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 80227617a4d6..fa613d1d7a8f 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)