Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965602AbbEMQBy (ORCPT ); Wed, 13 May 2015 12:01:54 -0400 Received: from mail-ig0-f176.google.com ([209.85.213.176]:36842 "EHLO mail-ig0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965030AbbEMQBu (ORCPT ); Wed, 13 May 2015 12:01:50 -0400 MIME-Version: 1.0 X-Originating-IP: [83.216.94.180] In-Reply-To: <1431530626-31493-3-git-send-email-ck.hu@mediatek.com> References: <1431530626-31493-1-git-send-email-ck.hu@mediatek.com> <1431530626-31493-3-git-send-email-ck.hu@mediatek.com> Date: Wed, 13 May 2015 17:01:50 +0100 Message-ID: Subject: Re: [RFC][PATCH 2/2] drm/mediatek: Add DRM Driver for Mediatek SoC MT8173. From: Daniel Stone To: CK Hu Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , David Airlie , Matthias Brugger , "devicetree@vger.kernel.org" , Jitao Shi , srv_heupstream@mediatek.com, Graeme Gregory , Rob Herring , Catalin Marinas , Will Deacon , Linux Kernel Mailing List , dri-devel , Cawa Cheng , YT Shen , Ashwin Chaugule , linux-mediatek@lists.infradead.org, Sascha Hauer , "open list:ABI/API" , Grant Likely , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1021 Lines: 26 Hi, On 13 May 2015 at 16:23, CK Hu wrote: > + /* > + * copy the mode data adjusted by mode_fixup() into crtc->mode > + * so that hardware can be seet to proper mode. > + */ > + memcpy(&crtc->mode, adjusted_mode, sizeof(*adjusted_mode)); Please do not do this. adjusted_mode is already available in crtc->hwmode. Please also restructure this driver to use the atomic infrastructure. A good example of how to do this can be found in the Rockchip RK3288 driver which was submitted a while ago: it started off as a legacy driver like this, but was converted during the submission phase. I'm sure there are many more comments to come, but certainly converting to be an atomic driver is the very first step. Cheers, Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/