Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752418AbcDSCnQ (ORCPT ); Mon, 18 Apr 2016 22:43:16 -0400 Received: from regular1.263xmail.com ([211.150.99.130]:37791 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbcDSCnP (ORCPT ); Mon, 18 Apr 2016 22:43:15 -0400 X-263anti-spam: BIG:0;ABS:1;DNS:0;ATT:0;SPF:S;KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED: 0 X-KSVirus-check: 0 X-RL-SENDER: mark.yao@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: mark.yao@rock-chips.com X-UNIQUE-TAG: <32595062a9262c0bdd96211bf18e6943> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <57159B37.9050806@rock-chips.com> Date: Tue, 19 Apr 2016 10:43:03 +0800 From: Mark yao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: John Keeping CC: David Airlie , Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/rockchip: get rid of rockchip_drm_crtc_mode_config References: <1460948611-32259-1-git-send-email-mark.yao@rock-chips.com> <20160418102538.0ed730ca.john@metanate.com> In-Reply-To: <20160418102538.0ed730ca.john@metanate.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1190 Lines: 35 On 2016年04月18日 17:25, John Keeping wrote: > On Mon, 18 Apr 2016 11:03:31 +0800, Mark Yao wrote: > >> >We need to take care of the vop status when use >> >rockchip_drm_crtc_mode_config, if vop is disabled, >> >the function would failed, that is terrible. >> > >> >Save connector type and output mode on drm_display_mode->private_flags >> >at encoder mode_fixup, then we can configure the type and mode safely >> >on crtc mode_set. > Since Rockchip is atomic, shouldn't this be using atomic_check hooks and > a subclassed crtc_state structure? > Hi John I try to use atomic_check with crtc_state, but it seems not easy, there are two value need transmit from connector to vop: connector type and out_mode the connector type I think we can loop the atomic state to find the connector type. but the out_mode is a custom value, I can't find a generic way to transmit it with atomic state. BTW, I think on atomic side, the drm_display_mode is under control by atomic state, and the mode->private_flags is not use by drm framework, I found i915 and gma500 also use mode->private_flags to transmit custom value. So I think it's no problem using mode->private_flags. -- Mark Yao